Displaying 1 result from an estimated 1 matches for "xyp1".
Did you mean:
xy1
2010 Jul 27
2
lattice: option to sort x when type = l
...; source ('http://www.stat.osu.edu/~pkapat/miscl/Code4xyplot_sort_type_l.R')
OR, step by step:
> library (lattice)
>
> # toy data
> D <- read.csv ('http://www.stat.osu.edu/~pkapat/miscl/Data4xyplot_sort_type_l.csv')
>
> # default behavior: obviously wrong
> xyp1 <- xyplot (y ~ x/1000 | C, groups = G, data = D, type = "o", main = 'Wrong behavior, obviously')
>
> # simplest soln:
> xyp2 <- xyplot (y ~ x/1000 | C, groups = G, data = with (D, D[do.call (order, list (x, C, G)),]), type = "o", main = 'Using pre-sort...