这个消息每次用library调用都会出现怎么办

Warning message:
In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="D:/OneDrive/??": 文件名、目录名或卷标语法不正确

R has known issues with cloud-synced folders and prior to 4.2.0 versions, with non-ASCII characters in the package library path as well. I would recommend changing your library path to a non-synced folder with ASCII characters only on the folder path.

You can change the default library folder by setting your R_LIBS_SITE environmental variable in a .Reviron or .Rprofile file. For example:

# In a .Renviron file you can set it by adding a line like this one with the desired location 
R_LIBS_SITE="C:\\Program Files\\R\\R-4.1.2\\library"

For a more detailed explanation, you can read this blog post

Note: Please try to make your questions in English, since it is the preferred language here and by using Chinese you are excluding most people from the conversation, thus lowering your chances of getting help.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.