[R] Drawing a histogram from a massive dataset
jwiley.psych at gmail.com
Mon Jul 18 22:11:09 CEST 2011
On Mon, Jul 18, 2011 at 10:57 AM, Paul Smith <phhs80 at gmail.com> wrote:
> [snip] I guess that I must have a data frame to plot a histogram.
Not at all!
## a *vector* of 100 million observation
x <- rnorm(10^8)
## a histogram for it (see attached for the result from my system)
No data frame required. I would not try this straight in anything but
traditional graphics for a 100 million observation vector, but if you
wanted it made in ggplot2 or something, you could prebin the data and
THEN plot bars corresponding to the bins.
Ph.D. Student, Health Psychology
University of California, Los Angeles
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4679 bytes
Desc: not available
More information about the R-help