准备一个愚蠢的问题...
我有一大组数据看起来有点像这样..
structure(list(V1 = structure(c(4L, 3L, 6L, 5L, 1L, 2L), .Label = c("1012",
"225", "58", "602", "62", "818"), class = "factor"), V2 = structure(c(4L,
3L, 6L, 5L, 1L, 2L), .Label = c("1012", "249", "58", "603", "62",
"824"), class = "factor"), V3 = structure(c(6L, 2L, 5L, 4L, 1L,
3L), .Label = c("1014", "117", "290", "442", "831", "992"), class = "factor"),
V4 = structure(c(6L, 3L, 5L, 2L, 1L, 4L), .Label = c("1033",
"1055", "166", "377", "831", "992"), class = "factor"), V5 = structure(c(3L,
4L, 6L, 2L, 1L, 5L), .Label = c("1033", "1067", "1575", "190",
"378", "832"), class = "factor"), V6 = structure(c(3L, 4L,
6L, 2L, 1L, 5L), .Label = c("1034", "1069", "1575", "221",
"379", "833"), class = "factor"), V7 = structure(c(3L, 5L,
6L, 2L, 1L, 4L), .Label = c("1063", "1092", "2351", "379",
"406", "834"), class = "factor")), .Names = c("V1", "V2",
"V3", "V4", "V5", "V6", "V7"), class = "data.frame", row.names = c(NA,
6L))
每行代表一个主题,沿列移动的每个值代表一个会话中老鼠按下杠杆的时间(以秒为单位)。我想用 ggplot 制作一个类似于this的图。但是我似乎无法弄清楚如何绘制时间序列,因为 ggplot 似乎想要一个离散的,命名为 x 和 y。我可以想出一些劳动密集型的方法来让它工作,但我知道我只是错过了一些简单的东西。