我目前有一個dataframe,我想把裡面其中一個coloum從character轉換成date
但是我只要一轉,他就會全部變成NA,我把locale調成LC_TIME C也沒有作用
想請問有人碰過同樣的情形或者有解法嗎?
這是轉換後的warrning
補上範例檔案,因為是商用檔案所以把個資都刪除了
https://drive.google.com/open?id=0B3xY9FMzjybzSUt5TTNOWERicmM
語法是 as.Date(訂單日期)->xxd$訂單日期
Warning message:
In grepl("|||", what, fixed = TRUE) :
input string 1 is invalid in this locale
這是我的session info
R version 3.2.5 (2016-04-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=Chinese (Traditional)_Taiwan.950 LC_CTYPE=Chinese
(Traditional)_Taiwan.950 LC_MONETARY=Chinese (Traditional)_Taiwan.950
[4] LC_NUMERIC=C
LC_TIME=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] tidyr_0.4.1 recommenderlab_0.1-9 registry_0.3
proxy_0.4-15 arules_1.4-1 Matrix_1.2-6
gtools_3.5.0
[8] dplyr_0.4.3 plyr_1.8.3
loaded via a namespace (and not attached):
[1] Rcpp_0.12.5 lattice_0.20-33 assertthat_0.1 grid_3.2.5
R6_2.1.2 DBI_0.4-1 magrittr_1.5 irlba_2.0.0
tools_3.2.5
[10] parallel_3.2.5