我的问题是参考这个问题here。看到dygraph现在支持数字x轴,我试图用数字x轴测试数据但是它给出了一个错误。我使用的代码是
dygraph(as.data.frame(x = 1:10, y = runif(10))) %>%
dyAxis("y", valueRange = c(0, 1.5)) %>%
dyEvent(2, label = "test") %>%
dyAnnotation(5, text = "A")
Error in as.POSIXlt.character(x, tz, ...) :
character string is not in a standard unambiguous format
答案 0 :(得分:1)
dygraph(data.frame(x = 1:10, y = runif(10))) %>%
dyAxis("y", valueRange = c(0, 1.5)) %>%
dyEvent(2, label = "test") %>%
dyAnnotation(5, text = "A")