1

When I open R got an error like this, and I don't know how to solve it.

I still have this error when I reinstall both R and Rstudio. I can use R as normal after the error except installing source package from GitHub using devtools::install_git(), it will have the same error as before.

enter image description here

user20650
  • 24,654
  • 5
  • 56
  • 91
Bean Lee
  • 33
  • 3
  • Welcome to Stack Overflow. Please spend some time learning [how to ask](https://stackoverflow.com/help/how-to-ask) questions here on SO, and then provide a [minimal reproducible example/attempt](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). You might also want to [take the tour](https://stackoverflow.com/tour). – Maurits Evers Oct 28 '18 at 12:57
  • Does it work after that initial error? Is the error thrown if starting with `R --vanilla`. Did you try reinstalling? – user20650 Oct 28 '18 at 13:08
  • @user20650 thanks for your answer, it still have this error when I reinstall both R and Rstudio, and I can use R as normal except installing source package in GitHub using devtools::install_git(), it will have the same error as before. – Bean Lee Oct 28 '18 at 13:23
  • 1
    try erasing any `.RData` file in your working directory or disabling "restore workspace on startup" in your RStudio options – Ben Bolker Oct 28 '18 at 13:30
  • @user20650@Ben Bolker Thanks both of you, this error disappears when I erasing.RData file.But I still don't understand how this error happened. – Bean Lee Oct 28 '18 at 13:45
  • R works with forward strokes (`/`) for filepaths and backslashes (`\ `) to be able to write special characters (e.g., `"\."` to indicate a dot in `grep()`). Maybe that's where your error comes from. – Roman Oct 28 '18 at 14:06
  • Something in your startup code likely tried to source a file that contained a string entered with unescaped backslashes. – user2554330 Oct 28 '18 at 15:17

0 Answers0