I would suggest two things here:
check on the size of other object you may have stored in memory, and get rid
of what you don't need.
? ls
? rm
also, consider running garbage collection to help free up memory in R
gc()
I hope this helps!
A
On Tue, Aug 31, 2010 at 1:56 AM, rusers.sh <rusers.sh@gmail.com> wrote:
> Hi,
> I read some posts from the mailing list on the same problem, but it seems
> that i still cannot solve this problem.
> I only want to generate some simulated data.
> #Generate 2500 observations-it works without errors
> > coords<-as.matrix(expand.grid(seq(0,100,length.out=50),
> seq(0,100,length.out=50)))
> #SimData is a user-written function
> > SimBinData<-SimData(n=2500,coords=coords, x.mu
> =c(0,1),covar.cor=matrix(c(1,0.25,0.25,1),
> 2, 2),beta=c(1,0.5,5))
> #Generate 10000 observations-errors appeared
> #Following some posts, i set the memory to the maximum value. But i still
> got errors.
> > memory.limit(size = 4095)
> [1] 4095
> > coords<-as.matrix(expand.grid(seq(0,100,length.out=100),
> seq(0,100,length.out=100)))
> > SimBinData<-SimData(n=10000,coords=coords, x.mu
> =c(0,1),covar.cor=matrix(c(1,0.25,0.25,1),
> 2, 2),beta=c(1,0.5,5))
> Error: cannot allocate vector of size 381.5 Mb
> > memory.size(TRUE)
> [1] 1276.31
> > memory.limit()
> [1] 4095
> > object.size(SimBinData)
> 170568 bytes
> Any suggestions?
> Thanks very much.
>
> --
> -----------------
> Jane Chang
> Queen's
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]