Displaying 1 result from an estimated 1 matches for "xyp2".
Did you mean:
xy2
2010 Jul 27
2
lattice: option to sort x when type = l
...<- 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-sorted data frame')
>
> # hack:
> # adds an additional `if' inside the `if ("l" %in% type) {...}' block of the default panel.xyp...