Error on R studio startup - r

I get the following error message in the console when opening Rstudio :
Error installing package: Error: ERROR: no packages specified
The filename, directory name, or volume label syntax is incorrect.
My R version is 3.1.1

This is the error you get from calling install.packages with no package specified.
> install.packages()
Error in install.packages() : no packages were specified
You might want to check whether something like that is included in your Rprofile.site file.

Related

Unable to access libraries in RStudio but not in R

I am facing a problem in RStudio when installing and using packages. I'm very very new to it so please bear with me while I describe it:
This is a new R and Rstudio installation in my PC, R version 4.1.2. For remote work due to life stuff. I usually run these same commands in my job computer with no problem (always in administrator mode).
However, when installing "readxl" to open an excel file:
> install.packages("readxl")
Installing package into ‘C:/Program Files/R/R-4.1.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/readxl_1.3.1.zip'
Content type 'application/zip' length 1717234 bytes (1.6 MB)
downloaded 1.6 MB
package ‘readxl’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘readxl’
Warning in install.packages :
problem copying C:\Program Files\R\R-4.1.2\00LOCK\readxl\libs\x64\readxl.dll to C:\Program Files\R\R-4.1.2\readxl\libs\x64\readxl.dll: Permission denied
Warning in install.packages :
restored ‘readxl’
The downloaded binary packages are in
C:\Users\Andrés RM\AppData\Local\Temp\Rtmp2RhFPr\downloaded_packages
I've read about deleting 00lockto avoid this problem but I can't find the file anywhere.
And when i check my libraries using libpath()
> .libPaths()
[1] "C:/Program Files/R/R-4.1.2" "C:/Program Files/R/R-4.1.2/library"
Then, if I want to load the library
> library(readxl)
Warning message:
In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="C:/Users/my_user/Documents": The system cannot find the path specified
It returns a path that I never specified in the first place and where I don't keep any other R library.
If i try to load an excel file:
R_meristem_measures <- read_excel("C:/Users/my_user/Desktop/R meristem measures.xlsx")
Error: Evaluation error: zip file 'C:\Users\my_user\Desktop\R meristem measures.xlsx' cannot be opened.
In addition: Warning message:
In normalizePath(path.expand(path), winslash, mustWork) :
path[1]="C:/Users/Andrés RM/Desktop/R meristem measures.xlsx": The system cannot find the path specified
After this, .libPaths()keeps returning the same results.
This happens with some other packages that I use daily (in my other computer) and the warning is the same.
However, I just tried to run this same code in native R (R x64 4.1.2) and it went perfect with no issues.
I am at a loss here. Among others I've tried sys.setenv(R_LIBS_USER)and also changing the same environment variables from the Control panel.R_LIBS="C:/R/library"also does not work.
At work I am using R 4.0 and libPaths()returns
.libPaths()
[1] "C:/Users/my_user/Documents/R/win-library/4.0" "C:/Program Files/R/R-4.0.2/library"
which is expected since my_user/etc is where i keep my packages.
Is this a problem with my computer or with something particular from RStudio? R itself works perfect but is a pain to use and I would like to use RStudio even if I can run my stuff in R console.
Thanks to everyone

Permission denied error installing rpart.plot package in R

Hello when I try to install rpart.plot package in R I receive the following error
Error in install.packages : cannot open file 'C:/Users/hp/Documents/R/win-library/4.0/file220c4f062ad7/Formula/doc/Formula.pdf': Permission denied
Perhaps a dependency problem. The rpart.plot package depends on pkg:'earth' and it in turn depends on pkg:Formula. Unfortunately, the install.packages function doesn't construct a search path for this situation and simply reports an error if the second-level dependency is not present. So do this:
install.packages("Formula", dependencies=TRUE)
Install.packages("rpart.plot", dependencies=TRUE)

error message while installing R Markdown on R version 4.0.1 on Windows

I am new to R and trying to install R Markdown on RStudio but it keeps giving me error messages eg
Warning in install.packages :
package ‘(tools)’ is not available (for R version 4.0.1)
Warning in install.packages :
unable to access index for repository https://cran.rstudio.com/bin/windows/contrib/4.0:
cannot open URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/PACKAGES'
Are you sure you have internet? try install.packages("Rmarkdown", dep = TRUE) you may also need to install latex for your system

Error installing tensorflow in R: /Users/emmeran/.virtualenvs/r-reticulate/bin/pip: No such file or directory

After installing the tensorflow package for R from Github, and loading with library(tensorflow), when doing install_tensorflow(), I get the error message below. I don't know how to get it to find the file or where I can even know where the file is. Thanks
install_tensorflow()
Using virtual environment '~/.virtualenvs/r-reticulate' ...
sh: /Users/emmeran/.virtualenvs/r-reticulate/bin/pip: No such file or directory
Error: Error installing package(s): 'pip'
In addition: Warning message:
In system2(pip, args) : error in running command

R Programming - Error

I am unable to execute any instruction in R. Getting below error.
Error in library("colorout") : there is no package called "colorout"
Also trying to execute: Rscript.exe -e ".libPaths()"
Warning message:
package 'plyr' was built under R version 3.5.1 Error
in sys.source(".my_custom_functions.r", envir = custom_env) :
'.my_custom_functions.r' is not an existing file

Resources