search for: loccode

Displaying 1 result from an estimated 1 matches for "loccode".

2006 Sep 01
2
Lattice plot with fitted curves
...I have fitted a cubic for each site using lm. I would like to obtain a lattice plot with one panel for each site and showing the original data, and the fitted cubic. The closest I have got to doing what I want is: fit <- fitted(paraslm1) temp <- cbind(paras, fit) xyplot(Density ~ Year | LocCode, data = temp, panel = function(x, y, ...){ panel.xyplot(x,y) panel.xyplot(x[LocCode],fit[LocCode],type="l") }) This doesn't give an error (most of my other attempts did), and draws the panels correctly with the original data, but doesn't draw...