Juliane Struve
2011-Aug-04 13:47 UTC
[R] Plotting multiple age distributions with histogram()
Dear list,
?
I would like to plot several age distributions that are influenced by a factor
(called group in the data example below). I would like to use historam() in the
lattice package, but I can't figure out how to set up the data. Could
someone give me a hint how to do it? for the example below?
?
Thanks a lot,
?
Juliane?
?
data <- structure(list(Age = c(1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L), No =
c(1084609L,
1076523L, 1066171L, 887874L, 881239L, 872763L, 726800L, 720632L,
712984L), Group = c(1L, 2L, 3L, 1L, 2L, 3L, 1L, 2L, 3L)), .Names =
c("Age",
"No", "Group"), class = "data.frame", row.names =
c(NA, -9L))
