R studio - unknown errors installing packages

Hello everyone. I would like to ask for your urgent help (as I am writing my dissertation) in order to solve a problem when trying to install some packages in R Studio...

For instance, readxl, bbmle and maxLik which are very important and essential for my code to be able to run, give this error:

> require(readxl)
> install.packages("readxl")
Error in install.packages : Updating loaded packages

Restarting R session...

> install.packages("readxl")
Installing package into ‘C:/Users/claud_000/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/readxl_1.0.0.zip'
Content type 'application/zip' length 1457757 bytes (1.4 MB)
downloaded 1.4 MB

Error in install.packages : cannot open file 'C:/Users/claud_000/Documents/R/win-library/3.4/file19473d6458f/readxl/extdata/clippy.xls': Permission denied

Even if I go directly to Tools-Install packages, it always says Permission denied. What is wrong here??


Have you tried running your install.packages("readxl") command in a fresh R session? If not, try pressing Ctrl + Shift + F10 and then running it.

Yes and I think now it's working, but the other packages I mentioned are not...

What error are you getting when you try to install the other packages?