R: warning/error when calling normalizePath(…) or adding to .libPath(…)

混江龙づ霸主 提交于 2019-12-10 23:23:52

问题


I have a shared computer. If I login with windows userA, I can run the following:

normalizePath("//mydrive/my/path", "/")

and it returns:

"\\\\mydrive/my/path"

However if login to windows under userB, I get this message:

Warning message: In normalizePath(path.expand(path), winslash, mustWork) : path[1]="//mydrive/my/path": An unexpected network error occurred

What does it mean? This has important consequences, as it prevents to add "//mydrive/my/path" to the .libPaths() when running under userB, e.g .libPaths(new="//mydrive/my/path"), it prints the same warning, then as soon as I try to use a package that is in this lib location, it show the ERROR:

Error in normalizePath(path.expand(path), winslash, mustWork) :
path[1]="//mydrive/my/path": An unexpected network error occurred


Here are the details of my session under userA:

> sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.4.2 tools_3.4.2 

Here are the details of my session under userB:

> sessionInfo()

R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.4.2 tools_3.4.2   

Finally, I also noticed the following warning on userB, which could be linked to the same issue:

WARNING: You are configured to use the CRAN mirror at https://cran.rstudio.com/. This mirror supports secure (HTTPS) downloads however your system is unable to communicate securely with the server (possibly due to out of date certificate files on your system). Falling back to using insecure URL for this mirror.

来源:https://stackoverflow.com/questions/47591969/r-warning-error-when-calling-normalizepath-or-adding-to-libpath

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!