I want to fix the error in RStudio that is displayed by characterization.

Asked 2 years ago, Updated 2 years ago, 39 views

Enter a description of the image here

This display appears when you save a file or write a code.What should I do?

In Windows, R is 3.3.4.RStudio is the running environment!

r

2022-09-30 21:32

3 Answers

Are you trying to save the file by opening it in another text editor, or by modifying a file that you do not have write permission to?

RStudio on Windows will cause garbled characters, but I was able to send the same error message when I tried to save the open file in RStudio in another text editor.


2022-09-30 21:32

Are there any files or folders with the following names in the folder where the R script you are working on is located?
*Display hidden files and folders must be enabled in Windows settings.

  • (folder name).Rproj
  • .Rproj.user

If you're not sure, you'll be prompted by R

dir(all.files=TRUE)

Type and paste the results here (remove any statements that may contain personal information or confidentiality).

If you have these, exit RStudio and move the above two files and folders to a different location, such as your desktop.Then, if you reopen the R script in RStudio, you may not get any error messages.


2022-09-30 21:32

You said it wasn't opened in another text editor, but isn't the working directory set to synchronize locally with online storage such as Google drives?

In my environment, I used the folder synchronized with my Google drive as the working directory, and when I was writing .Rmd and .R, similar errors occurred, and when I stopped synchronizing, I stopped getting errors.
It may depend on the specifications of the online storage, but I think the error may occur when the online storage client is browsing the file for synchronization (and often because there are minor changes to the temporary file).


2022-09-30 21:32

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.