Error when installing StatsbBombR (ERROR: lazy loading failed for package ‘StatsBombR’)

I everyone, I am new to R and I am trying to install the StatsBombR package shown here

But when I run devtools::install_github("statsbomb/StatsBombR) I get an error saying lazy loading failed for package ‘StatsBombR’. Would anybody be able to help. The complete error message is as follows:

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’

Help would be greatly appreciated!

I can't be sure if this is your only problem since you are not showing the complete output message but, this part means that you are missing a package dependency. To solve it you have to install the missing package, the tricky part is that SDMTools is no longer in CRAN so you need to install it from another repository, try with rforge.

install.packages("SDMTools",,"http://rforge.net/")

This topic was automatically closed 7 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.