Having trouble with installing StatsBombR package

I am new to R and am having trouble with installing Statsbomb package. Any advice would be of great help.

Downloading GitHub repo statsbomb/StatsBombR@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All
2: CRAN packages only
3: None
4: openssl (1.4.5 -> 1.4.6) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 1
openssl (1.4.5 -> 1.4.6) [CRAN]
Installing 1 packages: openssl
Installing package into ‘C:/Users/sreya/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/openssl_1.4.6.zip'
Content type 'application/zip' length 3987627 bytes (3.8 MB)
downloaded 3.8 MB

package ‘openssl’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
√ checking for file 'C:\Users\sreya\AppData\Local\Temp\RtmpCoYxr2\remotes2ae0718437a5\statsbomb-StatsBombR-671b80d/DESCRIPTION' (567ms)

  • preparing 'StatsBombR': (1s)
    √ checking DESCRIPTION meta-information ...
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
    Omitted 'LazyData' from DESCRIPTION
  • building 'StatsBombR_0.1.0.tar.gz'

Installing package into ‘C:/Users/sreya/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)

  • installing source package 'StatsBombR' ...
    ** using staged installation
    ** R
    ** byte-compile and prepare package for lazy loading
    Warning: replacing previous import 'foreach::when' by 'purrr::when' when loading 'StatsBombR'
    Warning: replacing previous import 'jsonlite::flatten' by 'purrr::flatten' when loading 'StatsBombR'
    Warning: replacing previous import 'foreach::accumulate' by 'purrr::accumulate' when loading 'StatsBombR'
    Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
    there is no package called 'SDMTools'
    Calls: ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
    Execution halted
    ERROR: lazy loading failed for package 'StatsBombR'
  • removing 'C:/Users/sreya/Documents/R/win-library/4.1/StatsBombR'
    Warning message:
    In i.p(...) :
    installation of package ‘C:/Users/sreya/AppData/Local/Temp/RtmpCoYxr2/file2ae03bd93085/StatsBombR_0.1.0.tar.gz’ had non-zero exit status

You are missing this old package that is no longer in CRAN, you can try to install it from RForge but there is no guarantee that it is going to be compatible with the latest R version.


Yes. That was exactly the problem. Thank you so much @andresrcs


I used this code though to get SDMTools.

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.