Displaying 1 result from an estimated 1 matches for "data4xyplot_sort_type_l".
2010 Jul 27
2
lattice: option to sort x when type = l
...there anything even simpler
that I have missed?
Example:
Everything included:
> 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, li...