As Martin Morgan replied, Bioconductor packages should have been installed despite error messages. However, this continues to happen with future package updates.
In general, I would advise you not to change the permission of the system folders, since programs such as R should work well without administrative rights.
If you avoid changing the permissions of system folders, I would also advise against installing packages using administrative rights, since you will have to do this in the future every time you have to update these packages!
The best way to solve this problem is to reinstall previously installed packages with administrator rights. Packets can be identified by the error code issued by Bioconductor. In your case, these are the packages Matrix, mgcv, survival - note that the error message does not differ between CRAN and Bioconductor packages, it includes all packages that were previously installed with administrator rights!
To remove reported packages, open R with administrator privileges (hopefully for the last time) and use remove.packages() to remove all reported packages, including Bioconductor packages. For your case:
remove.packages(c("Matrix", "mgcv", "survival"))
Before reinstalling these packages, exit and restart R without administrator privileges . Now you can reinstall the CRAN packages.
install.packages(c("Matrix", "mgcv", "survival"))
You will be asked if you want to install packages in a local directory, enter yes to do this.
If the installation failed, find your local R directory (in the home / user folder) and add it as lib = . On Linux, a command might look like this:
install.packages(c("Matrix", "mgcv", "survival"), lib = "~/R/x86_64-pc-linux-gnu-library/3.5")
If Bioconductor packages were previously installed with administrator rights:
library(BiocInstaller) biocLite(c("PACKAGE1", "PACKAGE2"))
Add the lib = argument again to the biocLite() , if otherwise it cannot be installed in the local directory.