Re: [R] histograms

From: hadley wickham <>
Date: Fri 01 Sep 2006 - 21:07:50 GMT

> Your data seems to have come through messed up but lets
> assume you have a data frame with one column per tumor.
> The convert your data to stacked form and call histogram:
> DF <- data.frame(T1 = 1:10, T2 = 6:15)
> library(lattice)
> histogram(~ values | ind, stack(DF))

Or with ggplot and reshape:

qplot(x=value, facets=. ~ variable, data=melt(DF,m=1:2), type="histogram")

Hadley mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sat Sep 02 07:21:56 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 07 Sep 2006 - 07:51:17 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.