I use Rstudio and try to add new packages through command console.
It fails to install it for this reason
install.packages(\"devtools\"); devtools::i
I ran into this problem. The issue for me was using single quotes instead of double quotes. Using install.packages("foo") worked fine, whereas install.packages('foo') caused this issue.
install.packages("foo")
install.packages('foo')