I am trying to import xlsx file into R using many ways. None of them works.
I tried "Import Dataset" via the Environment tab. I got an error message saying
.onLoad failed in loadNamespace() for 'Rcpp', details:
call:new_dummyObject(.dummyInstancePointer)
error:object'class__dummyInstance' not found.
I also tried to install readxl package. It was successfully installed, but when I call the package using library(readxl) there is a warning message saying
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
In addition: Warning message:
package ‘readxl’ was built under R version 4.0.5
sessionInfo()
R version 4.0.4 (2021-02-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
I tried to install the Rcpp packages. When I called it the error message below comes up.
Error: package or namespace load failed for ‘Rcpp’:
.onLoad failed in loadNamespace() for 'Rcpp', details:
call: new_dummyObject(.dummyInstancePointer)
error: object 'class__dummyInstance' not found
In addition: Warning message:
package ‘Rcpp’ was built under R version 4.0.5
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.0.4 tools_4.0.4
install.packages("Rcpp")
Installing package into ‘C:/R/R-4.0.3/library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/Rcpp_1.0.7.zip'
Content type 'application/zip' length 3262273 bytes (3.1 MB)
downloaded 3.1 MB
package ‘Rcpp’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\utsanat\AppData\Local\Temp\Rtmpgr3ZBO\downloaded_packages
library(Rcpp)
Error: package or namespace load failed for ‘Rcpp’:
.onLoad failed in loadNamespace() for 'Rcpp', details:
call: new_dummyObject(.dummyInstancePointer)
error: object 'class__dummyInstance' not found
In addition: Warning message:
package ‘Rcpp’ was built under R version 4.0.5
There seems to be a mismatch between your R version (4.0.4) and your package library (which seemed have been compiled under R 4.0.3).
Hard to pin point the exact problem so I think it would be easier to update to the latest R version 4.1.1, move your existing system level package library to the new location (whiteout overwriting the base R packages) and then reinstall all your packages for that version using update.packages(checkBuilt = TRUE). Also, make sure you are not pointing your libpaths to the old system library.