New installation on Working PC environment. Restriction placed, for example require to adjust proxy server setting in order to connect and install packages.
> library(readxl)
Error: package or namespace load failed for ‘readxl’:
.onLoad failed in loadNamespace() for 'Rcpp', details:
call: new_dummyObject(.dummyInstancePointer)
error: object 'class__dummyInstance' not found
This is the same error, if user is to use the Rstudio user interface {Environment>Import Dataset>From Excel}
Similar error occurs for other packages
> library(ggplot2)
Error: package or namespace load failed for ‘ggplot2’:
.onLoad failed in loadNamespace() for 'rlang', details:
call: NULL
error: The rlang package is not properly installed.
The DLL version does not correspond to the package version.
Please update rlang to the latest version.
Updating packages on Windows requires precautions:
<https://github.com/jennybc/what-they-forgot/issues/62>
> install.packages("Rcpp")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/ALONG/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/Rcpp_1.0.8.zip'
Content type 'application/zip' length 3317916 bytes (3.2 MB)
downloaded 3.2 MB
package ‘Rcpp’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\ALONG\AppData\Local\Temp\Rtmp8GfIr6\downloaded_packages
For rlang
> install.packages("rlang")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/ALONG/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/rlang_1.0.1.zip'
Content type 'application/zip' length 1610900 bytes (1.5 MB)
downloaded 1.5 MB
package ‘rlang’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\ALONG\AppData\Local\Temp\Rtmp8GfIr6\downloaded_packages
The thing is on my home PC the readxl function work by default , but in the work fresh install it gives error.
Maybe you have the package installed on your both package library locations and since the system level package library is ranking first, that installation is the one it is giving you problems and not the one located here
Check on that and set your default package library accordingly, have in mind that for updating your system-level package library you need to run RStudio as "administrator".
pardon there is a typo i made, and when i copy and paste i was trying to avoid pasting the error.
this missing line as as follows
> a -> installed.packages(lib.loc= "C:/Users/ALONG/Documents/R/win-library/4.1")
Error: object 'a' not found
> a <- installed.packages(lib.loc= "C:/Users/ALONG/Documents/R/win-library/4.1")