[R] llines and NA

Deepayan Sarkar deepayan at stat.wisc.edu
Wed Sep 3 19:52:22 CEST 2003


This is a bug in grid.lines. A possible workaround is to use your own function 
that handles this using grid.segments (or lsegments).

On Wednesday 03 September 2003 09:09 am, Bodo Ahrens wrote:
> Hallo helpers,
>
> I tried to use "llines" of package lattice in e.g.
>
> levelplot(z~x+y,xyz, at=c.at,region=T,col.regions=col.v,main =
> paste("Test",sep=""),aspect = mapasp(xyz,x=xyz$x,y=xyz$y),
> panel=function(x,y,subscripts,...){
> panel.levelplot(x,y,subscripts,...);
> lines(linex,liney)})
>
> The problem is that there are NAs in linex and liney and thus I get strange
> line segments to infinity.
>
> The base function "lines" is able to handle this. Any ideas how to get a
> similar behavior with "llines"?
>
> Thanks,
>
> Bodo




More information about the R-help mailing list