【发布时间】:2016-07-06 02:37:17
【问题描述】:
我有两个数据框:
df1 <- read.table(text = "
Time Score ID
-83 19 C1
-69 17 C2
-55 15 C3
-28 22 C4
0 27 C5", header=TRUE)
df2 <- read.table(text = "
Time Score ID
-83 19 C1
-55 15 C3
0 27 C5", header=TRUE)
我想用 df1 创建一个 xyplot,按 ID 分组,但不标记每个 ID。然后使用来自 df2 的点向现有 xyplot 添加点
library(lattice)
xyplot(df1$Score ~ df1$Time | df1$ID, type ="b", cex = .5)
不胜感激有关如何不标记每个 ID(删除面板标题)然后将 df2 作为点添加到现有绘图的建议
【问题讨论】:
-
感谢 Psidom 格式化
-
df2 是 df1 的子集,具有相同的值。 df2 值将覆盖 df1 值。这是你想要的吗?