[R] plot histogram and print

From: livia <yn19832_at_msn.com>
Date: Tue, 05 Jun 2007 04:34:30 -0700 (PDT)

I have got a dataset with two factors, and I would like to print the histograms of the variable "return" for each combination of the two factors. I do not know how can I name the figure title to sth like "main="alevel &blevel"" according to the data.


myhistogram <- function(x)
hist (x, freq = FALSE)
lines (density(x), col = "red")
rug (x)
tapply(return, list(a, b), myhistogram)

Could anyone help me with this? Many thanks.

View this message in context: http://www.nabble.com/plot-histogram-and-print-tf3871150.html#a10967630
Sent from the R help mailing list archive at Nabble.com.

R-help_at_stat.math.ethz.ch mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 05 Jun 2007 - 11:39:56 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 Tue 05 Jun 2007 - 12:31:32 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.