Problems to load tidyverse - r

I installed tidyverse in R Studio, but I'm having a problem running it.
I ran library("tidyverse") but I keep getting an error.
error: package or namespace load failed for ‘tidyverse’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/libs/Rcpp.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/libs/Rcpp.so, 6): Symbol not found: _EXTPTR_PTR
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/libs/Rcpp.so
Expected in: /Library/Frameworks/R.framework/Resources/lib/libR.dylib
in /Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/libs/Rcpp.so
In addition: Warning message:
package ‘tidyverse’ was built under R version 4.0.2
I also tried uninstalling and reinstalling but that didn't seem to work.

We answered that a few times. It is an unfortunate error in R 4.0.0 and R 4.0.1 which changed a minor detail about EXTPTR_PTR.
Upgrade to R 4.0.2 and the issue will go away.

The error is also encountered in installing Rcpp package and it is seems can be solved by upgrading the R version to 4.02.

Related

error message trying to install homals package in R

I'm trying to install the Homals package - library(homals), but keep getting this error message:
library(homals)
Error : .onLoad failed in loadNamespace() for 'rgl', details: call:
dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared
object
'/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rgl/libs/rgl.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rgl/libs/rgl.so,
6): Library not loaded: /opt/X11/lib/libGLU.1.dylib Referenced from:
/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rgl/libs/rgl.so
Reason: image not found Error: package or namespace load failed for
‘homals’
I have a couple of my colleagues to run the same code, the same thing happens. I have re-install R studio to the newest version.
install.packages("rgl")
install.packages("homals")
library(homals)
Any solutions for this? thank you.
I was able to successfully install on both Windows and Mac. I believe the root cause here is that you have R version 3.3 installed when you require at least v3.5.3 as per below:
library(homals)
Warning message:
package ‘homals’ was built under R version 3.5.3

RWeka installation under Rstudio on Mac

I tried to find solutions from previous posts, but they do not solve my problem.
I am using macOS High Sierra and have Java installed. Below is the error reported by Rstudio. Also, rJava, Mac, and R are really messy with each other. I found this post but still does not work.
https://github.com/MTFA/CohortEx/wiki/Run-rJava-with-RStudio-under-OSX-10.10,-10.11-(El-Capitan)-or-10.12-(Sierra)
///////////////////
library(RWeka)
Error: package or namespace load failed for ‘RWeka’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: #rpath/libjvm.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so
Reason: image not found
In addition: Warning message:
package ‘RWeka’ was built under R version 3.4.4
I met the same question and I found this is helpful.
Cannot load R xlsx package on Mac OS 10.11
1.In terminal enter the following to relink Java correctly:
sudo R CMD javareconf
2.Back in R (or RStudio) install the rJava package from source:
install.packages("rJava",type='source')
Then
library(rJava)
and
library(RWeka)
should work.

Incompatible library version RSiena

I'm trying to load the RSiena package into R, but keep getting this error message:
Error: package or namespace load failed for ‘RSiena’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /opt/X11/lib/libfontconfig.1.dylib
Referenced from: /usr/local/lib/libtk8.6.dylib
Reason: Incompatible library version: libtk8.6.dylib requires version 11.0.0 or later, but libfontconfig.1.dylib provides version 10.0.0
I tried installing three ways:
install.packages("RSiena") , install.packages("RSiena", repos="http://R-Forge.R-project.org") , and installing straight from tgz file (from https://cran.r-project.org/web/packages/RSiena/index.html).
The first two installation methods do not give any error and say The downloaded binary packages are in /var/folders/mk/__r_sbzn5mx88x04mrlycsg00000gq/T//RtmpbxlMY8/downloaded_packages.The third option gives this message Error in install.packages : type == "both" cannot be used with 'repos = NULL'
None allow me to load the package. I'm working with R version 3.4.3 (2017-11-30) in RStudio Version 1.1.423 on Mac OS X El Capitan (version 10.11.6).
I've tried uninstalling and reinstalling. I'm not sure how else to troubleshoot this issue.
The most recent version (RSiena v.1.2.26) of rsiena addresses tcltk issues, and is now available on Github here: https://github.com/snlab-nl/rsiena.
SOLUTION. I installed XQuartz from xquartz.macosforge.org and now the package loads successfully.

Error in dyn.load(file, DLLpath = DLLpath, ...)

I am trying to install Deseq2, however I get this error. The same appears for all other packages I try to install with BiocLite...I wonder what is the problem? I installed R and rstudio with anaconda on my ubuntu 16.04. R version 3.3.2. Any help is much appreciated.
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/dani/anaconda2/lib/R/library/tidyr/libs/tidyr.so':
/home/dani/anaconda2/lib/R/library/tidyr/libs/tidyr.so: undefined symbol: _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/dani/anaconda2/lib/R/library/tidyr’
* restoring previous ‘/home/danianaconda2/lib/R/library/tidyr’
does it has something to do with this error at the beginning?
Makevars:21: Makevars.local: No such file or directory
touch: "Makevars.local"
I know this is not the best solution: I was using anaconda version 4.3.1 and I changed it to 4.1.1 and reinstalled all using this version, R remained always v 3.3.2. So I don't know if there is a bug or some incompatibility problem with Rcpp package or else in the last version of conda.

Unable to load caret package in R on R 3.1.0 on OSX 10.9

I installed the R caret package using install.packages command and did library(caret). I am recieving the following error
>library(caret)
Loading required package: lattice
Loading required package: ggplot2
Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.1/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /usr/local/lib/libtcl8.6.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/tcltk/libs/tcltk.so
Reason: image not found
Error: package or namespace load failed for ‘caret’
I searched other posts and also installed OSX tcltk package from http://cran.us.r-project.org/bin/macosx/tools/ but it still does not seem to work. I also installed tcltk2 package from R but still does not work.. Kindly help
I have met the same problem with the same error message but unfortunately, just reinstalling R1.3 didn't solve the problem for me.
To solve it, I had to install X-Quartz as explained here in the "Mac OS X Trouble-shooting" section and the problems related to tcltk.
Do this and it will resolve the problem
install.packages("quantreg")
What version of R are you using? Do you use Mavericks? You may need to update to a version which includes Mavericks updates.
http://cran.r-project.org/bin/macosx/
I had the same issue. Reinstalling Quartz solved the issue
Try this, worked for me.
install.packages("caret", dependencies = T)
Once that is done, run
install.packages("pbkrtest", dependencies = T)

Resources