[R] Re: [R-SIG-Mac]how much memory does one need...

About this list Date view Thread view Subject view Author view Attachment view

From: Thomas Lumley (tlumley@u.washington.edu)
Date: Tue 02 Oct 2001 - 02:38:40 EST


Message-id: <Pine.A41.4.33.0110010935510.84818-100000@homer04.u.washington.edu>

On Sat, 29 Sep 2001, David A Richmond wrote:
>
> Several questions arise from this problem: 1) how do I determine how much
> memory is free within the program?, 2) how do I determine how much memory
> is being consumed by a given object?, 3) how do I force R to create a
> matrix as a single rather than a double?

1) gc() or memory.profile()

2) Not well-defined in general, but for a matrix it is usually 8 bytes per
element for real, 4 for integer (plus a fairly small fixed overhead).

3) You don't. R doesn't have single precision. as.single() is just a
request that when the object is passed to .C or .Fortran it should be
converted to single precision.

        -thomas

Thomas Lumley Asst. Professor, Biostatistics
tlumley@u.washington.edu University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Thu 17 Jan 2002 - 11:10:07 EST