BasketballAnalyzeR Installation Problems

I'm trying to install and call the BasketballAnalyzeR package on RStudio (not in Conda) on a 2017 MacBook (updated). I think package installation is working but not when i use the library function.

System Information:

  • RStudio Version: 1.3.959
  • OS Version: macOS Catalina 10.15.5

Here's what I see:

#REPREX

install.packages("BasketballAnalyzeR")

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/BasketballAnalyzeR_0.5.0.tgz'
Content type 'application/x-gzip' length 2826492 bytes (2.7 MB)
==================================================
downloaded 2.7 MB


The downloaded binary packages are in
	/var/folders/mq/bzz01vj95w358hxs2tcc3wbr0000gn/T//RtmpHb3DG3/downloaded_packages

library(BasketballAnalyzeR)

> library(BasketballAnalyzeR)

I get these errors:

Error: package or namespace load failed for ‘BasketballAnalyzeR’ 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 ‘BasketballAnalyzeR’ was built under R version 4.0.2

I'm trying to install and call the tidyverse package on RStudio (not in Conda) on a 2017 MacBook (updated).

System Information:

  • RStudio Version: 1.3.959
  • OS Version: macOS Catalina 10.15.5

Here's what I see:

#REPREX

install.packages("tidyverse")

And here are the errors:

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 merged these, since the errors seem to be referring to the same issue.

It seems to be having issue with Rcpp, which is a separate package dependency.

Could you try to ensure Rcpp is installed?

install.packages('Rcpp')

It seems to be an issue with the CRAN version of Rcpp for MacOS systems, can you try installing this way?

install.packages("Rcpp", repos="https://rcppcore.github.io/drat")

This is the GitHub issue for reference

So, as it turns out I took a week off to study some other projects and came back and it now works in both R and RStudio. Thanks for this advice and help. I wish I could tell you what the solution was, to help others, but I honestly can't replicate the error.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.