我在使用parse_date_time
lubridate
函数的mdy格式时遇到问题。
# does work
date <- "21 December 2016"
date_text <- parse_date_time(date, "dmy", tz = "UTC")
# does work
date <- "2016 December 21"
date_text <- parse_date_time(date, "ymd", tz = "UTC")
# does work
date <- "2016 21 December"
date_text <- parse_date_time(date, "ydm", tz = "UTC")
# DOES NOT WORK
date <- "December 21 2016"
date_text <- parse_date_time(date, "mdy", tz = "UTC")
任何人都可以告诉我为什么最后一个版本无法工作以及如何使其工作? 我收到了消息:
Warning message:
All formats failed to parse. No formats found.