Re: [R] memory use of copies

2014-01-29 Thread Philippe GROSJEAN
For the last case with the list: > x <- 1:2; y = list(x)[rep(1, 4)] > .Internal(inspect(y)) @102bbe090 19 VECSXP g0c3 [MARK,NAM(2)] (len=4, tl=0) @106119628 13 INTSXP g0c1 [MARK] (len=2, tl=0) 1,2 @106119628 13 INTSXP g0c1 [MARK] (len=2, tl=0) 1,2 @106119628 13 INTSXP g0c1 [MARK] (len=2, tl=

Re: [R] memory use of copies

2014-01-28 Thread Ross Boylan
Thank you for a very thorough analysis. It seems whether or not an operation makes a full copy really depends on the specific operation, and that it is not safe to assume that because I know something is unchanged there will be no copy. For example, in your last case only one element of a list wa

Re: [R] memory use of copies

2014-01-27 Thread Martin Morgan
Hi Ross -- On 01/23/2014 05:53 PM, Ross Boylan wrote: [Apologies if a duplicate; we are having mail problems.] I am trying to understand the circumstances under which R makes a copy of an object, as opposed to simply referring to it. I'm talking about what goes on under the hood, not the user

Re: [R] memory use problem.

2012-09-10 Thread chrisk
Thank you for the help and fast response. I'm going to look into getting some time on the unix machines. On Sep 10, 2012 10:28 AM, "Prof Brian Ripley [via R]" < ml-node+s789695n4642670...@n4.nabble.com> wrote: On 10/09/2012 16:13, chrisk wrote: > I having issues with my memory size in R for Win

Re: [R] memory use problem.

2012-09-10 Thread Prof Brian Ripley
On 10/09/2012 16:13, chrisk wrote: I having issues with my memory size in R for Windows. I have implemented the 3gb switch for Windows 7 32 bit with 8gb of memory, only 4gb is available for use due to 32 bit limitations. 512Mb is taken by the shared video card, the memory limit is 2559mb yet I

Re: [R] Memory use in R

2010-10-29 Thread Duncan Murdoch
On 29/10/2010 12:46 PM, DM2010 wrote: Dear R Users I have two questions about how R makes use of memory on a Windows computer. On my machine certain R jobs seem to stop with messages such as... "Error: cannot allocate vector of size 215.0 Mb" ...when, according to Windows Task Manager, there a

Re: [R] memory use without running gc()

2010-08-10 Thread Johann Hibschman
Allan Engelhardt writes: > ### Method 2 > ## Setup > file <- paste("/proc", Sys.getpid(), "stat", sep = "/") > what <- vector("list", 44); what[[23]] <- integer(0) > ## In your logging routine > vsz <- scan(file, what = what, quiet = TRUE)[[23]]/1024 > cat("Virtual size: ", vsz, "\n", sep = "")

Re: [R] memory use without running gc()

2010-08-09 Thread Allan Engelhardt
How about asking the operating system, e.g. ### Method 1 ## Setup cmd <- paste("ps -o vsz", Sys.getpid()) ## In your logging routine z <- system(cmd, intern = TRUE) cat("Virtual size: ", z[2], "\n", sep = "") ### Method 2 ## Setup file <- paste("/proc", Sys.getpid(), "stat", sep = "/") what <- v

Re: [R] memory use without running gc()

2010-08-06 Thread Johann Hibschman
jim holtman writes: > ?memory.size Only works on Windows. I guess I should have specified; this is on Linux. Thanks, Johann __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www

Re: [R] memory use without running gc()

2010-08-06 Thread jim holtman
?memory.size On Fri, Aug 6, 2010 at 1:00 PM, Johann Hibschman wrote: > Is there any way to get the current memory used by R without running > gc()? > > I'd like to include the memory usage in logging output, but calling gc() > to get that information takes long enough to be noticeable (~ 6 s with

Re: [R] Memory use

2009-01-14 Thread Prof Brian Ripley
On Wed, 14 Jan 2009, Albrecht, Dr. Stefan (AIM SE) wrote: Dear R-help list, I am just trying to increase my memory for R, but for some reason I cannot really increase the memory size as much as I would like. I have 3 GB of RAM on a Windows XP (R 2.8.1) memory.size() [1] 879.4667 memory