[R] plot matrix data- lattice?
ggrothendieck at gmail.com
Wed Aug 1 15:43:05 CEST 2007
mat <- matrix(1:24, 6, dimnames = list(year = 2001:2006, region = letters[1:4]))
xyplot(Freq ~ year | region, as.data.frame.table(mat))
On 8/1/07, Dong Guo <guo.dong99 at gmail.com> wrote:
> Dear all,
> I have a matrix, dim = (years, regions)
> I would like to plot the data in a lattice so that each panel is region's
> plot with y-axis based on values, x-axis based on year.
> how can I do that?
> Many thanks in advance.
> [[alternative HTML version deleted]]
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help