Hadley Wickham <hadley <at> rice.edu> writes:

> 
> Am I missing something obvious on how to draw multi-line plots in
> base graphics?
> 
> In ggplot2, I can do:
> 
data(Oxboys, package = "nlme")
library(ggplot2)
 
qplot(age, height, data = Oxboys, geom = "line", group = Subject)
 
> But in base graphics, the best I can come up with is this:
> 
with(Oxboys, plot(age, height, type = "n"))
lapply(split(Oxboys[c("age", "height")], Oxboys$Subject), lines)

[quoting removed to fool gmane] 
> Am I missing something obvious?
> 

 reshape to wide format and matplot()?

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to