Hi, I am new to R and RStudio. I had it working fine, but then I started getting errors, and I reinstalled the programs (R v. 4.0 and RStudio v. 1.2.5042 and Rtools40), and now I can't install packages.
install.packages("pkgbuild")
Installing package into ‘C:/Users/jorlova/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
Warning in install.packages :
unable to access index for repository https://owi.usgs.gov/R/bin/windows/contrib/4.0:
cannot open URL 'https://owi.usgs.gov/R/bin/windows/contrib/4.0/PACKAGES'
There is a binary version available but the source version is later:
binary source needs_compilation
pkgbuild 1.0.6 1.0.7 FALSE
installing the source package ‘pkgbuild’
trying URL 'https:// cloud.r-project. org/src/contrib/pkgbuild_1.0.7.tar.gz'
Content type 'application/x-gzip' length 29159 bytes (28 KB)
downloaded 28 KB
- installing source package 'pkgbuild' ...
** package 'pkgbuild' successfully unpacked and MD5 sums checked
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Error: .onLoad failed in loadNamespace() for 'processx', details:
call: NULL
error: package 'ps' was installed before R 4.0.0: please re-install it
Execution halted
ERROR: lazy loading failed for package 'pkgbuild' - removing 'C:/Users/jorl/Documents/R/win-library/4.0/pkgbuild'
Warning in install.packages :
installation of package ‘pkgbuild’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\jorl\AppData\Local\Temp\RtmpA73PT2\downloaded_packages’
It tells me to install different packages one by one, like "ps" above, so I have been re-installing them, and it's taking forever. With every installation I get the same multiple warnings ( unable to access index for repository & cannot open URL)
The downloaded source packages are always in the Temp folder - this is weird, too, right?
I tried reinstalling R and RStudio. What else can I try? I'd appreciate your suggestions!