【发布时间】:2014-12-15 21:23:10
【问题描述】:
在与in this question 类似的情况下,我正在从单个数据框中输出多个时间序列图表,但我无法确定为每个图添加唯一的图表标题...。
我的数据可以在here找到
我正在按如下方式处理此问题
gw <- read.csv("gw_cbp.csv")
require(ggplot2)
require(plyr)
require(gridExtra)
pl <- dlply(gw, .(Well.ID), function(dat) {
ggplot(data = dat, aes(group = 1, x = Date, y = Benzene), ) + geom_line() +
geom_point() + xlab("Date") + ylab("mg/Kg") +
geom_smooth(method = "lm") + ggtitle(Well.ID)
})
ml <- do.call(marrangeGrob, c(pl, list(nrow = 32, ncol = 1)))
ggsave("benzene.pdf", ml, height = 72, width = 11, units = "in", limitsize = F)
这里
+ ggtitle(Well.ID)
没有找到在 ddply 函数中使用的单个 Well.ID...
谁能告诉我在这种情况下如何调用唯一的 Well.ID?
感谢ZR
【问题讨论】: