【发布时间】:2017-07-02 22:55:33
【问题描述】:
我有一个 data.frames 列表:
samplelist = list(a = data.frame(x = c(1:10), y=rnorm(10),
b= data.frame(x=c(5:10), y = rnorm(5),
c = data.frame(x=c(2:12), y=rnorm(10))
我想构造一个以下格式的ggplot:
ggplot()+
geom_line(data=samplelist[[1]], aes(x,y))+
geom_line(data=samplelist[[2]], aes(x,y))+
geom_line(data=samplelist[[3]], aes(x,y))
但这并不是超级自动化的。有人对如何解决这个问题有建议吗?
谢谢!
【问题讨论】:
-
仅供参考,您的
samplelist代码有一些错误。