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
Changing the security setting on the R folder to "full control" fixed this for me. See the third posting down at this link for step by step instructions: Unable to update R packages in default library on Windows 7