plot the first point of each group of panel data in lattice xyplot
问题 I'm trying to create a line plot using groups and panels that superposes a symbol on the first value of each group. This attempt plots the first point of the first group only and does nothing for the other two groups. library(lattice) foo <- data.frame(x=-100:100, y=sin(c(-100:100)*pi/4)) xyplot( y~x | y>0, foo, groups=cut(x,3), panel = function(x, y, subscripts, ...) { panel.xyplot(x, y, subscripts=subscripts, type='l', ...) # almost but not quite: panel.superpose(x[1], y[1], subscripts