错误阻止了我编织我的文档。Rstudio中的未知时区
我收到的错误是
Quitting from lines 79-81 (Project_GYMBO.Rmd)
Error in mutate_impl(.data, dots) :
Evaluation error: (converted from warning) unknown timezone 'default/America/Toronto'.
导致错误的线条非常简单。
weight.rm %>% mutate(datetime = ymd_hms(datetime)) %>% head
的数据看起来像
data.frame(stringsAsFactors=FALSE,
datetime = c("2017-10-09 16:03:09", "2017-10-09 15:36:23",
"2017-10-09 15:04:53", "2017-10-09 13:01:23",
"2017-10-09 12:33:16", "2017-10-09 12:05:41"),
WR = c(87, 69, 61, 51, 50, 48)
)
这给了我
Warning message:
In as.POSIXlt.POSIXct(x, tz) : unknown timezone 'default/America/Toronto'
我目前从多伦多工作。
从我可以告诉,这是因为R无法正确确定我的时区。当我拨打Sys.timezone()
时,我得到了NA。
这是一个已知的问题?谁能告诉我为什么R无法理解我的时区?
我不能够通过复制来重现问题/粘贴UR数据 – akrun
'lubridate :: ymd_hms'的'tz'参数默认为'“UTC”',所以这是...奇怪。 “as.POSIXlt.POSIXct”被调用也没有意义。一些必要的背景显然缺失。 – alistaire