我試圖從tidyverse包在R中,使用read_csv但我總是得到這個消息:R:誤差read_csv,「sysdata.rdb」:沒有這樣的文件或目錄
> read_csv(readr_example("mtcars.csv"))
Error in date_names_lang(date_names) :
cannot open file '~/R/win-library/3.4/readr/R/sysdata.rdb': No such file or directory
的文件和目錄確實存在:
> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] dplyr_0.7.0 purrr_0.2.2.2 readr_1.1.1 tidyr_0.6.3 tibble_1.3.3 ggplot2_2.2.1 tidyverse_1.1.1
loaded via a namespace (and not attached):
[1] Rcpp_0.12.11 compiler_3.4.0 cellranger_1.1.0 plyr_1.8.4 forcats_0.2.0 tools_3.4.0 jsonlite_1.5
[8] lubridate_1.6.0 gtable_0.2.0 nlme_3.1-131 lattice_0.20-35 rlang_0.1.1 psych_1.7.5 parallel_3.4.0
[15] haven_1.0.0 xml2_1.1.1 stringr_1.2.0 httr_1.2.1 hms_0.3 grid_3.4.0 glue_1.0.0
[22] R6_2.2.1 readxl_1.0.0 foreign_0.8-67 reshape2_1.4.2 modelr_0.1.0 magrittr_1.5 scales_0.4.1
[29] assertthat_0.2.0 mnormt_1.5-5 rvest_0.3.2 colorspace_1.3-2 stringi_1.1.5 lazyeval_0.2.0 munsell_0.4.3
[36] broom_0.4.2
你有任何suggestio:
> list.files("~/R/win-library/3.4/readr/R/")
[1] "readr" "readr.rdb" "readr.rdx" "sysdata.rdb" "sysdata.rdx"
我有R的最新版本和tidyverse的N +
檢查文件是否存在的路徑,當你鍵入此得到:'readr_example(「mtcars.csv」)'如果不是,改變你的工作目錄:'setwd()' –
該文件確實存在。這個問題本身就解決了(我不知道如何)。無論如何,謝謝 –