Re: [R] histogram with NAs

From: hadley wickham <h.wickham_at_gmail.com>
Date: Fri, 18 Jan 2008 10:56:43 -0600

> "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/

______________________________________________
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.
Received on Fri 18 Jan 2008 - 17:09:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 18 Jan 2008 - 17:30:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive