Vallat Morgan <morgan.vallat <at> epfl.ch> writes: > I have a 'basic' issue and hope someone has a bit of code to solve it. I > have two populations plotted as histograms on the same figure. Basically I want to add the moving average > (based on hist) for both populations on my graph. I'm also interested in the x coordinate of the curves > intersection.
Moving averages are fine if you do not have future data (such as stock markets or temperatures), but suboptimal for densities. R has powerful methods for these: If you have MASS (the book, check ch. 5.6). Or the examples in library/MASS/scripts/ch05.R Dieter ______________________________________________ R-help@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.