I tried this question on the R-Help list with no success CrossPostHere...
I am working on some xyplots using the Lattice Library. My X-axis is the date and I am reproducing charts similar to those found in the R Gallery (see here:R-Gallery Trellis)
However, the key difference is that some of my data is missing (not collected at that time). For instance, I might have a whole month that I do not have data. The problem is that xyplot connects the data points.
To continue with the R Gallery plot example, if your Outside Temperature data stopped at 20 degrees in March 2007 and picked back up in July 2007 at 20 degrees you would have a straight line connecting the two data points (at 20 degrees). I would rather have no line which would (in my opinion) better represent that no data was collected for that time period.
I am curious to know if anyone has a idea of how to alter this behavior so that the lines are not connected when data are missing in the series. I am hoping there is an easy or slick solution but as I started to think about it, it might be rather complex because you'd need to tell xyplot what granularity you'd like to not connect (e.g. 5 hours in a row, 4 days in a row, etc).
Any help would be much appreciated !