그것 명확하지 않다 "을 평균 무엇 분 단위로 "는 의미하지만이를 무시하고 1 분 5 분씩 데이터를 저장하고 빈을 표시합니다. 정수 오버 플로우를 피하기 위해 데이터가 "numeric"
으로 지정되었습니다.
library(zoo)
library(ggplot2)
library(scales)
# read data from character variable Lines; Lines shown after graph
z <- read.zoo(text = Lines, index = 1:2, tz = "",
colClasses = c(NA, NA, "numeric"))
ag1 <- aggregate(z, as.POSIXct(cut(time(z), "min")), sum)
ag5 <- aggregate(z, as.POSIXct(cut(time(z), "5 min")), sum)
autoplot(na.approx(cbind(ag1, ag5)), facet = NULL) +
scale_x_datetime(breaks = "1 min", labels = date_format("%H:%M"))
Here is `Lines` :
Lines <- "2014-08-08 06:37:34.610 639205638
2014-08-08 06:37:37.110 239205638
2014-08-08 06:38:58.810 635899318
2014-08-08 06:38:21.877 1420094614
2014-08-08 06:45:11.772 140034211"
을 : 당신이 그 (것)들을 별도의 패널에 표시하려면
facet = NULL
생략