Re: [R] Suggestion for big files [was: Re: A comment about R:]

From: hadley wickham <h.wickham_at_gmail.com>
Date: Fri 06 Jan 2006 - 18:28:27 EST

> Selecting a sample is easy. Yet, I'm not aware of any SQL device for
> easily selecting a _random_ sample of the records of a given table. On
> the other hand, I'm no SQL specialist, others might know better.

There are a number of such devices, which tend to be rather SQL variant specific. Try googling for select random rows mysql, select random rows pgsql, etc.

Another possibility is to generate a large table of randomly distributed ids and then use that (with randomly generated limits) to select the appropriate number of records.

Hadley



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Jan 06 18:39:09 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:54 EST