Hello friends! I'm a total R beginner and learning to analyze data from clinical trials. I've fallen at the first hurdle: trying to install tidyverse. I can't seem to interpret the error code and figure out what I'm doing wrong. Any guidance much appreciated:
> install.packages("tidyverse")
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/tidyverse_1.3.0.tgz'
Content type 'application/x-gzip' length 433049 bytes (422 KB)
==================================================
downloaded 422 KB
The downloaded binary packages are in
/var/folders/gh/c2_0_qzs7_78hwwny61z9z880000gn/T//RtmpNudTjO/downloaded_packages
> library(tidyverse)
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
> remove.packages("tidyverse")
Removing package from ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library’
(as ‘lib’ is unspecified)
> library(tidyverse)
Error in library(tidyverse) : there is no package called ‘tidyverse’
> install.packages("tidyverse"
+ )
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/tidyverse_1.3.0.tgz'
Content type 'application/x-gzip' length 433049 bytes (422 KB)
==================================================
downloaded 422 KB
The downloaded binary packages are in
/var/folders/gh/c2_0_qzs7_78hwwny61z9z880000gn/T//RtmpNudTjO/downloaded_packages
Thanks very much Nir. I ran that line of code first and then tried to download and load tidyverse but still no joy (screenshot of code below). Do you have any further suggestions? Again, really appreciate all your help.
Thanks to you and everyone for all your help. I did the rather old fashioned thing of uninstalling R and R Studio, and upon re-install I'm not able to load tidyverse etc without issue. Thanks again!