[R] histogram with NAs

hadley wickham h.wickham at gmail.com
Fri Jan 18 17:56:43 CET 2008


> "Typical plots with vertical bars are not histograms. Consider barplot
> or plot(*, type = "h") for such bar plots. ". But no worry, I've mixed
> them up myself a number of times.

Or you can use ggplot2, which will do the right thing regardless of
whether you have continuous or categorical data:

library(ggplot2)
qplot(sample.data, geom="histogram")
qplot(rnorm(100), geom="histogram")

Hadley

-- 
http://had.co.nz/



More information about the R-help mailing list