我有一个数据集,其中有一列日期 (emp2$hiredate) 是 char 格式。将其转换为日期时,出现以下错误:
> date1 <- emp2$hiredate[2]
> str(date1)
chr "20FEB1981"
> as.POSIXct(date1)
Error in as.POSIXlt.character(x, tz, ...) :
character string is not in a standard unambiguous format
我该如何解决这个问题?