[R] ks.test; memory problems

Jonathan jonsleepy at gmail.com
Tue Mar 9 22:11:59 CET 2010


Hi R-help,
    I am interested in comparing two vectors of data
observations to see if they come from the same distrubution (and have
settled on the Kolmogorov-Smirnov test to do this)..

I'd prefer to use all my data points, but computationally speaking,
this is proving to be troublesome due to the size of my vectors (the
larger of the two is about 90 million observations).  I suppose I
could take a smaller sample of points from that large vector to use as
input in my ks-test, but I want to see if I can avoid doing that, in
favor of including all of the data..

Code:
> result <- ks.test(rep(1:940,100000),rep(1:940,800))
Error: cannot allocate vector of size 358.6 Mb

Any ideas?

OS: Windows 7 64-bit, R ver. 2.10.1, Memory: 4 gb

Best,
Jonathan



Best,
Jonathan



More information about the R-help mailing list