x <- structure(list(Date = structure(c(15358, 15359, 15362, 15363,
15364, 15365), class = "Date"), EndTime = structure(c(1327016747,
1327166720, 1327361839, 1327446733, 1327533097, 1327619504), class = c("POSIXct",
"POSIXt"), tzone = ""), ThresholdTime = structure(list(sec = c(0,
0, 0, 0, 0, 0), min = c(0L, 0L, 0L, 0L, 0L, 0L), hour = c(9L,
9L, 9L, 9L, 9L, 9L), mday = c(20L, 21L, 24L, 25L, 26L, 27L),
mon = c(0L, 0L, 0L, 0L, 0L, 0L), year = c(112L, 112L, 112L,
112L, 112L, 112L), wday = c(5L, 6L, 2L, 3L, 4L, 5L), yday = c(19L,
20L, 23L, 24L, 25L, 26L), isdst = c(0L, 0L, 0L, 0L, 0L, 0L
)), .Names = c("sec", "min", "hour", "mday", "mon", "year",
"wday", "yday", "isdst"), class = c("POSIXlt", "POSIXt"))), .Names = c("Date",
"EndTime", "ThresholdTime"), row.names = c(NA, 6L), class = "data.frame")
我希望能够创建一个图表,其中 xaxis 是 Date 并且 yaxis 是 theEndTime
并绘制一个geom_hline
using ThresholdTime
。
我可以去掉 %H 和 % fromEndTime
把它放进去yaxis
。基本上我试图显示哪些数据点EndTime
违反了ThresholdTime
.
我面临的问题是:
如果Endtime<-c("2012-01-02 09:00:00")
我的阈值是ThresholdTime
,c("2012-01-01 08:00:00")
我将如何在图表上显示它。如果我从中取出%H:%M
,EndTime
它看起来不会像违反了ThresholdTime
但实际上它违反了阈值。
对于解决这个问题,我将不胜感激。