Warning message In normalizePath

Hello
I am a novice user of the program R, while studying RStudio I encountered an error, how to fix it

Warning message:
In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="C:/Users/???????/Documents": Syntax error in file name, folder name, or volume label

It depends on the context you got this message, what command you executed that gave you this message?

I run the program RStudio and when I enter any equation or command, this error occurs

Can you please provide a specific example? Ideally try to provide a proper REPRoducible EXample (reprex) illustrating your issue.

as one of the examples

Can you please translate the non-English part to the message? So far we don't have enough information to help you out.

It is written there: Syntax error in file name, folder name, or volume label

I guess the program can't find the folder path with the "path", I didn't find how to change the folder path

Sorry, it was not clear to me since I have no idea what language is on the screenshot and since it is a screenshot I can't even copy and use a translator.

R has problems with non-ASCII characters in folder paths, I suspect this is happening when R tries to save your .Rhistory file. Can you try with the R GUI to make sure this is R related and not just RStudio IDE related?

Also can you provide the output of sessionInfo()?

I believe that the error appears due to the fact that the path to .Rhistory file contains Cyrillic letters. is there any way to change the folder for saving .Rhistory file

By default R loads and saves .Rhistory within the current working directory but RStudio loads and saves a single global .Rhistory file located in the default working directory.

So by changing your default working directory you change the location of .Rhistory

how to change working directory? to change the location of .Rhistory.

You can change it on the "global options"

1 Like

This topic was automatically closed 7 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.