Hello,

I am new to R exploratory data analysis and plotting.  Is anyone aware of a way
to overlay a set of conditional histograms with conditional PDFs?  Below, I
generate a lattice plot of precipitation histograms based on different months
and stations, given a subset of the dataset:


histogram(~ data | month * station,
        data = sta.stack[sta.stack[,"type"]=="precip" & 
(sta.stack[,"month"]=="Dec" |
sta.stack[,"month"]=="Jan" | sta.stack[,"month"]=="Feb"),],
        xlab = "Precipitation (mm)")


I previously used a combination of the low-level 'lines()' and 'dgamma()'
functions to overlay a gamma PDF onto a single histogram.  Now what I would
like to do is to do the same thing, but with a function that allows me to
specify a formula similar to that in the histogram function above

[SomeKindOfPDF] ~ [x-range] | month * station

which will plot the PDF with the appropriate factors (month and station).

All I'm looking for is for someone to get me going in the right direction with a
useful package or function to use.

Any help is much appreciated!
Brad Christoffersen

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to