3
我正在嘗試使用scale_x_datetime來提煉我的x軸。我讀從ggplot2 website的機制的文檔,但在這個網站的例子中產生同樣的錯誤我得到:scale_x_datetime產生錯誤?
> library(ggplot2)
> start <- ISOdate(2001, 1, 1, tz = "")
> df <- data.frame(
+ day30 = start + round(runif(100, max = 30 * 86400)),
+ day7 = start + round(runif(100, max = 7 * 86400)),
+ day = start + round(runif(100, max = 86400)),
+ hour10 = start + round(runif(100, max = 10 * 3600)),
+ hour5 = start + round(runif(100, max = 5 * 3600)),
+ hour = start + round(runif(100, max = 3600)),
+ min10 = start + round(runif(100, max = 10 * 60)),
+ min5 = start + round(runif(100, max = 5 * 60)),
+ min = start + round(runif(100, max = 60)),
+ sec10 = start + round(runif(100, max = 10)),
+ y = runif(100)
+)
>
> last_plot() + scale_x_datetime(major = "2 weeks", minor = "1 week")
Error in continuous_scale(aesthetics, "datetime", identity, breaks = breaks, :
unused argument(s) (major = "2 weeks", minor = "1 week")
>
所以是文檔過期或有什麼問題在這裏?
您包含的鏈接已過期 – 2016-06-13 14:06:22
已更正。什麼阻止你自己修復它? – ROLO 2016-06-14 09:35:55