[R] Odp: R crashes with large vectors

Petr PIKAL petr.pikal at precheza.cz
Mon Jul 12 12:12:40 CEST 2010


Hi

r-help-bounces at r-project.org napsal dne 09.07.2010 11:42:47:

> Good afternoon,
> 
> I have been experiencing a lot of crashes working with large vectors in 
R.
> 
> Specifically, I am using XTS of length of minimum 120k elements.
> 
> My problem is that I cannot display the vector (otherwise R crashes), I
> cannot plot it either (otherwise R crashes). That could be solved by
> reducing the amount of points.

I do not know what you mean by XTS but when you say it is a vector it 
seems that you have something rong with your R installation.

x<-rnorm(1e7) # vector of 10 mil values.

mean(x)
sd(x) 

is almost instant.

For plotting it is better to use a sample of such data

plot(sample(x, 100000))

Regards
Petr

> 
> However, I have been performing some statistical opreations on is and 
even
> sd(myXTS) crashes R.
> 
> By "crashes", I mean shuts down without any warning whatsoever.
> 
> I use R 2.11.1 (64).
> 
> Has anyone had the same kind of problem?
> 
> Can we solve this?
> 
> Best,
> 
> 
> -- 
> Jeremie
> 
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list