Hello,

I am fairly new to R am stumped on how to get the xyplot function in the 
lattice package to produce a scatter plot of count data versus time, such that 
the count data represent 8 different groups, and the plot produced has 8 unique 
"smoothed" lines for the different groups.  This is the closest I can get to 
the desired plot:

xyplot(masmean ~ mas, data = Pre96CR.masmeans, groups = behavior,
     type = 'smooth', span = 0.3, lwd =2,
     xlab = "Minutes After Sunrise", ylab = "Behaviors at Castle"
     key = simpleKey(levels(Pre96CR.masmeans$behavior), space = 'right'))

This code produces a plot, but one level of the grouping factor ('behavior') is 
always absent from the plot and in the middle of the plot I receive an error 
message:
Error using packet 1
NA/NaN/Inf in foreign function call (arg 1)
Otherwise, the plot is exactly what I want with smoothed lines produced for the 
7 other levels of "behavior".  Thanks in advance for any ideas/suggestions.

Cheers,
Peter

------------------------------------------------------------
Auto Insurance
Click to get a free auto insurance quotes from top companies.
http://tagline.excite.com/fc/BK72PcZaarRjzT3NanuZSqmiJRbhpHy3XCE7MhKHfzwJU7fMMxfSz2/
        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to