Displaying 20 results from an estimated 106 matches for "350000".
Did you mean:
30000
2011 Nov 13
1
Understand Ncells and Vcells, from gc()
Dear all,
I am working on a 64 bits Linux system.
I issue the following R commands:
> rm(list=ls()) # To remove all objects in the workspace.
> gc() # To free memory.
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 124250 6.7 350000 18.7 350000 18.7
Vcells 124547 1.0 786432 6.0 476934 3.7
> gc() # I had to do it again, don't know why!
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 124257 6.7 350000 18.7 350000 18.7
Vcells 124574 1.0 786432 6.0 476934 3.7
> gc() # Just to be sure things have stabilized.
used (Mb) gc...
2005 Nov 15
1
cannot.allocate.memory.again and 32bit<--->64bit
...Gb of memory
i demonstrate, that there is times to times a problem with allocating of
objects of large size, for example
0.state (no objects yet created)
------------------------------------
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 162070 4.4 350000 9.4 350000 9.4
Vcells 59921 0.5 786432 6.0 281974 2.2
1.state: let create now a vector of large size
--------------------------------------------------
> my.vector<-rnorm(100000*500)
> object.size(my.vector)/1024^2
[1] 381.4698
> 100000*500*8...
2008 Mar 24
1
Cannot allocate large vectors (running out of memory?)
...eem
to solve the problem.
Can anyone explain why is this happening, and how to fix it?
Thanks,
Ronnen.
P.S. E-mailed CCs of posted replies would be appreciated.
> rm(list=ls(all=TRUE))
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 143465 3.9 350000 9.4 350000 9.4
Vcells 88573 0.7 50380943 384.4 131023877 999.7
> memory.limit()
[1] 1535.875
> n <- 8640 * 4320
> x=rep(1/3, n)
> memory.size()
[1] 578.8543
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 143471 3.9...
Unnecessary extra copy with matrix(..., dimnames=NULL) (Was: Re: modifying large R objects in place)
2007 Sep 27
0
Unnecessary extra copy with matrix(..., dimnames=NULL) (Was: Re: modifying large R objects in place)
...cing it to a double matrix by assigning
(double) 1 to element [1,1]. However, even when correcting for this
mistake, there is an extra copy created when using matrix().
Try this in a fresh vanilla R session:
> print(gc())
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 136684 3.7 350000 9.4 350000 9.4
Vcells 81026 0.7 786432 6.0 473127 3.7
> x <- matrix(1, nrow=5000, ncol=5000)
> print(gc())
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 136793 3.7 350000 9.4 350000 9.4
Vcells 25081043 191.4 27989266 213.6 25081056 191.4
> x[...
2011 Nov 13
1
To moderator
...I am working on a 64 bits Linux system.
>> I issue the following R commands:
>> > rm(list=ls()) # To remove all objects in the workspace.
>> > gc() # To free memory.
>> used (Mb) gc trigger (Mb) max used (Mb)
>> Ncells 124250 6.7 350000 18.7 350000 18.7
>> Vcells 124547 1.0 786432 6.0 476934 3.7
>> > gc() # I had to do it again, don't know why!
>> used (Mb) gc trigger (Mb) max used (Mb)
>> Ncells 124257 6.7 350000 18.7 350000 18.7
>> Vcells 124574 1.0 786432 6.0 47693...
2006 May 16
2
Large database help
...I tried the following code just to see if I could work with 2 variables
but it seems not possible:
R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.2.1 (2005-12-20 r36812)
ISBN 3-900051-07-0
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 169011 4.6 350000 9.4 350000 9.4
Vcells 62418 0.5 786432 6.0 289957 2.3
> memory.limit(size=4090)
NULL
> memory.limit()
[1] 4288675840
> system.time(a<-matrix(runif(1e6),nrow=1))
[1] 0.28 0.02 2.42 NA NA
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 171344 4.6...
2008 Jan 30
1
Understanding an R improvement that already occurred.
...aries of the RAM. It may be a useful developer
tool for big-data problems.
------------------------
R version 2.4.1 (linux):
> x <- matrix(as.integer(0), 1e+08, 3)
> x <- x + 1
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 233754 12.5 467875 25 350000 18.7
Vcells 300119431 2289.8 787870506 6011 750119944 5723.0
------------------------
R version 2.6.0 (linux):
> x <- matrix(as.integer(0), 1e+08, 3)
> x <- x + 1
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 137931 7.4 350000 18.7 350000...
2007 Mar 28
2
Suggestion for memory optimization and as.double() with friends
...uble, the
object seems to be copied internally, doubling the memory requirement.
See example below. Same for as.character() etc. Is this intended?
Example:
% R --vanilla
> x <- double(1e7)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 234019 6.3 467875 12.5 350000 9.4
Vcells 10103774 77.1 11476770 87.6 10104223 77.1
> x <- as.double(x)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 234113 6.3 467875 12.5 350000 9.4
Vcells 10103790 77.1 21354156 163.0 20103818 153.4
However, couldn't this easily be avoided by...
2005 Dec 14
2
The fastest way to select and execute a few selected functions inside a function
...ase, it would be faster if I would compute all functions, even if I
need only one:
myf.all<-function(x){
list(mean=mean(x), max=max(x), sum=sum(x))
}
> gc();system.time(for(i in 1:10000)myf.all(1:20))
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 165659 4.5 350000 9.4 350000 9.4
Vcells 61135 0.5 786432 6.0 283043 2.2
[1] 0.90 0.00 1.08 NA NA
> gc();system.time(for(i in 1:10000)myf(FUN="mean",1:20))
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 165659 4.5 350000 9.4 350000 9.4
Vcells 61135 0.5 7864...
2010 Apr 05
3
Creating R packages, passing by reference and oo R.
Dear All,
I would like some advice on creating R packages, passing by reference and oo R.
I have created a package that is neither elegant nor extensible and rather cumbersome (it works). I would like to re write the code to make the package distributable (should it be of interest) and easy to maintain.
The package is for Bayesian model determination via a reversible jump algorithm and has
2008 Apr 07
0
Some memory questions: data.frame and lists.
...uestions. The
output below was gotten from R-2.6.2, compiled with
--enable-memory-profiling on Ubuntu Linux.
=======================================================================
>>> Code and output 1:
> gc( )
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 131180 7.1 350000 18.7 350000 18.7
Vcells 136261 1.1 786432 6.0 573372 4.4
> nn <- 1000000
> ll <- list(xx = rnorm(nn), yy = rnorm(nn))
> tracemem(ll)
[1] "<0x1e32c38>"
> tracemem(ll$xx)
[1] "<0x2af22e144010>"
> tracemem(ll$yy)
[1] "<0x2af22e8e6...
2011 Jan 17
1
isoreg memory leak?
I believe there is a memory leak in isoreg in the current version of R,
as I believe the following shows
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 120405 3.3 350000 9.4 350000 9.4
Vcells 78639 0.6 786432 6.0 392463 3.0
> for(k in 1:100) {
+
+ y <- runif(10000)
+ isoreg(x,y)
+ }
> rm(x)
> rm(y)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 121637 3.3 350000 9.4 350000 9.4
Vcells 578615 4.5 1300...
2008 Jul 20
2
Erro: cannot allocate vector of size 216.0 Mb
...uge time-series to embedd, and i tried
increasing memory.limit() and memory.size(max=TRUE), but nothing.
Just before the command:
> memory.size(max=TRUE)
[1] 13.4375
> memory.limit()
[1] 1535.875
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 209552 5.6 407500 10.9 350000 9.4
Vcells 125966 1.0 786432 6.0 496686 3.8
>
I increased the memory limit:
> memory.limit(3000)
NULL
> memory.limit()
[1] 3000
> memory.size()
[1] 11.33070
> memory.size(max=TRUE)
[1] 13.4375
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 209552 5.6...
2012 Dec 04
3
list to matrix?
How do I convert a list to a matrix?
--8<---------------cut here---------------start------------->8---
list(c(50000, 101), c(1e+05, 46), c(150000, 31), c(2e+05, 17),
c(250000, 19), c(3e+05, 11), c(350000, 12), c(4e+05, 25),
c(450000, 19), c(5e+05, 16))
as.matrix(a)
[,1]
[1,] Numeric,2
[2,] Numeric,2
[3,] Numeric,2
[4,] Numeric,2
[5,] Numeric,2
[6,] Numeric,2
[7,] Numeric,2
[8,] Numeric,2
[9,] Numeric,2
--8<---------------cut here---------------end--------------->8---...
2006 Jan 26
1
maximizing available memory under windows XP
...(Mb) max used (Mb)
Ncells 252021 6.8 467875 12.5 379294 10.2
Vcells 71097226 542.5 140857919 1074.7 140597245 1072.7
>
Here is the gc() output on 2.2.0 after I edited the header:
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 174118 4.7 350000 9.4 350000 9.4
Vcells 130065529 992.4 257820332 1967.1 257565551 1965.1
>
Here is the code that I used to fill my memory (nothing fancy):
a <- diag(1000)
b <-a
for (i in 1:1000000) {
a<- diag(1000)
b <- rbind(b,a)
}
gc()
[[alternative HTML version deleted]]
2010 Nov 23
2
Error: cannot allocate vector of size x Gb (64-bit ... yet again)
...he size of an R object exceed the amount of availlable RAM
memory?
Empirically my system with 4Gb RAM and ample Swap, is failing:
> x <- integer(10^9)
> object.size(x)
4000000040 bytes
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 121195 6.5 350000 18.7 350000 18.7
Vcells 500124024 3815.7 606849099 4629.9 550124408 4197.2
> matrix(x, ncol=16)
Error: cannot allocate vector of size 3.7 Gb
I don't understand how this operation violates the limits detailed in
the Memory-limit help (above).
Thank you!
Derek Eder
----------...
2006 Jun 13
1
Cramer-von Mises normality test
...ality test
data: ln.Mn.Total..ug.kg
D = 0.0869, p-value = 0.002011
OK, next the data column:
Mn-Total, ug/kg
460000
400000
510000
600000
770000
180000
210000
1000000
2600000
490000
260000
760000
840000
400000
430000
230000
660000
1200000
370000
230000
290000
320000
400000
660000
620000
1100000
350000
450000
880000
960000
570000
870000
820000
970000
1100000
450000
730000
390000
640000
380000
340000
1400000
870000
260000
430000
290000
290000
550000
540000
240000
470000
650000
390000
380000
410000
220000
400000
380000
500000
1000000
520000
690000
500000
520000
260000
630000
630000
410000
290000
13...
2006 Jun 14
1
Bug in nortest cvm.test package (PR#8980)
...ality test
data: ln.Mn.Total..ug.kg
D = 0.0869, p-value = 0.002011
OK, next the data column:
Mn-Total, ug/kg
460000
400000
510000
600000
770000
180000
210000
1000000
2600000
490000
260000
760000
840000
400000
430000
230000
660000
1200000
370000
230000
290000
320000
400000
660000
620000
1100000
350000
450000
880000
960000
570000
870000
820000
970000
1100000
450000
730000
390000
640000
380000
340000
1400000
870000
260000
430000
290000
290000
550000
540000
240000
470000
650000
390000
380000
410000
220000
400000
380000
500000
1000000
520000
690000
500000
520000
260000
630000
630000
410000
290000
13...
2006 May 05
1
converting code into a function - seperating a data frame with n columns into n individual vectors
I have many very large dataframes with 20 columns
each.
In order to conserve memory, I wish to separate the
data frame into 20 vectors, each named the name of the
dataframe followed by .1,.2,.3
.20.
(For example purposes, one data frame is named
?testa?.)
e.g. testa.1, testa.2, testa.3
I have written the code to do this (see below). I am
trying to convert this into a function that I can
reuse.
2005 Jul 12
1
allocation of large matrix failing
Hello, this is probably something silly which I am doing, but I cannot
understand why this allocation is not happening.
Here is a my C code which tries to allocate a list of size 333559, and
then a matrix of size 8*333559
I thought I might be running into memory problems, but R is not even
using that much (I start R with
more memory and it stays constant) Also, I start R as I normally do and
I