Hi - I was so excited to discover StatsBomb and try out a project with there free data, but I cannot get "SDMtools" or "StatsBombR" to install. I get a warning message about a non-zero exit status.
I would greatly appreciate any help. I have read some older posts, and it looks like maybe the package is not updated for the latest version of R?
Warning message:
In i.p(...) :
installation of package βC:/Users/ANNCHI~1/AppData/Local/Temp/RtmpGAdO8c/file247842022119/SDMTools_1.1-222.tar.gzβ had non-zero exit status
I hope this helps. I have included the console output for devtools::install_github("statsbomb/SDMTools
and
devtools::install_github("statsbomb/StatsBombR")
Thanks so much for all advice!
devtools::install_github("statsbomb/SDMTools")
Downloading GitHub repo statsbomb/SDMTools@HEAD
ββ R CMD build βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β checking for file 'C:\Users\Ann Chisnell\AppData\Local\Temp\Rtmpqg1guG\remotes83a8100c549a\statsbomb-SDMTools-5d22d7a/DESCRIPTION' ...
β preparing 'SDMTools': (548ms)
β checking DESCRIPTION meta-information ...
β cleaning src
β checking for LF line-endings in source and make files and shell scripts
β checking for empty or unneeded directories
β building 'SDMTools_1.1-222.tar.gz'
Installing package into βC:/Users/Ann Chisnell/AppData/Local/R/win-library/4.3β
(as βlibβ is unspecified)
* installing *source* package 'SDMTools' ...
** using staged installation
** libs
gcc -I"C:/PROGRA~1/R/R-43~1.0/include" -DNDEBUG -I"c:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c ConnectedComponentLabelling.c -o ConnectedComponentLabelling.o
/bin/sh: line 1: gcc: command not found
make: *** [C:/PROGRA~1/R/R-43~1.0/etc/x64/Makeconf:265: ConnectedComponentLabelling.o] Error 127
ERROR: compilation failed for package 'SDMTools'
* removing 'C:/Users/Ann Chisnell/AppData/Local/R/win-library/4.3/SDMTools'
Warning message:
In i.p(...) :
installation of package βC:/Users/ANNCHI~1/AppData/Local/Temp/Rtmpqg1guG/file83a868a01b2b/SDMTools_1.1-222.tar.gzβ had non-zero exit status
> devtools::install_github("statsbomb/StatsBombR")
Downloading GitHub repo statsbomb/StatsBombR@HEAD
ββ R CMD build βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β checking for file 'C:\Users\Ann Chisnell\AppData\Local\Temp\Rtmpqg1guG\remotes83a827896f44\statsbomb-StatsBombR-b0a5ee7/DESCRIPTION' ...
β preparing 'StatsBombR': (622ms)
β 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/Ann Chisnell/AppData/Local/R/win-library/4.3β
(as βlibβ is unspecified)
* installing *source* package 'StatsBombR' ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Warning: replacing previous import 'jsonlite::flatten' by 'purrr::flatten' when loading 'StatsBombR'
Warning: replacing previous import 'foreach::when' by 'purrr::when' 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: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
ERROR: lazy loading failed for package 'StatsBombR'
* removing 'C:/Users/Ann Chisnell/AppData/Local/R/win-library/4.3/StatsBombR'
Warning message:
In i.p(...) :
installation of package βC:/Users/ANNCHI~1/AppData/Local/Temp/Rtmpqg1guG/file83a8ece6811/StatsBombR_0.1.0.tar.gzβ had non-zero exit status
Thank you for the explanation. I am confused with the installation of Rtools. I have RStudio 4.3.0, so I tried to install Rtools43. I installed onto my computer in Windows at C:\rtools43 . In RStudio, I ran Sys.which("make")
with Console Output
make
"C:\\rtools43\\usr\\bin\\make.exe"
Could you please explain what I am doing wrong or what I need to do next?
You are not doing anything wrong. If you installed Rtools43, then you should be able to install these packages. It seems like SDMTools is not installed properly, so try to (re)install that first.
Ok, Yeah! SDM Tools is installed. Now, I am stuck with the following Console Output for StatsBombR installation.
script: devtools::install_github("statsbomb/StatsBombR")
Console Output
> devtools::install_github("statsbomb/StatsBombR")
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: vctrs (0.6.2 -> 0.6.3) [CRAN]
Enter one or more numbers, or an empty line to skip updates: 1
vctrs (0.6.2 -> 0.6.3) [CRAN]
Installing 1 packages: vctrs
Installing package into βC:/Users/Ann Chisnell/AppData/Local/R/win-library/4.3β
(as βlibβ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
vctrs 0.6.2 0.6.3 TRUE
Thank you so much for your patience with me. I am getting closer!
Yes, that's the output. But what is under this output? If you have a question there, then answer that question. If there is no question, then there is an installation attempt I suppose.
I am not seeing StatsBombR show up in my Packages in the Output Pane. I just tried to rerun my script and was given this in the Console:
devtools::install_github("statsbomb/StatsBombR")
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: vctrs (0.6.2 -> 0.6.3) [CRAN]
Enter one or more numbers, or an empty line to skip updates: 1
vctrs (0.6.2 -> 0.6.3) [CRAN]
Installing 1 packages: vctrs
Installing package into βC:/Users/Ann Chisnell/AppData/Local/R/win-library/4.3β
(as βlibβ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.3/vctrs_0.6.3.zip'
Content type 'application/zip' length 1329055 bytes (1.3 MB)
downloaded 1.3 MB
package βvctrsβ successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package βvctrsβ
Warning: restored βvctrsβ
The downloaded binary packages are in
C:\Users\Ann Chisnell\AppData\Local\Temp\RtmpaApZ5m\downloaded_packages
ββ R CMD build βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
checking for file 'C:\Users\Ann Chisnell\AppData\Local\Temp\RtmpaApZ5m\remotes3380380e4933\statsbomb-StatsBombR-b0a5ee7/DESCRIPTION' (343ms)
β preparing 'StatsBombR': (691ms)
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/Ann Chisnell/AppData/Local/R/win-library/4.3β
(as βlibβ is unspecified)
installing source package 'StatsBombR' ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Warning: replacing previous import 'jsonlite::flatten' by 'purrr::flatten' when loading 'StatsBombR'
Warning: replacing previous import 'foreach::when' by 'purrr::when' when loading 'StatsBombR'
Warning: replacing previous import 'foreach::accumulate' by 'purrr::accumulate' when loading
'StatsBombR'
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
Warning: replacing previous import 'jsonlite::flatten' by 'purrr::flatten' when loading 'StatsBombR'
Warning: replacing previous import 'foreach::when' by 'purrr::when' when loading 'StatsBombR'
Warning: replacing previous import 'foreach::accumulate' by 'purrr::accumulate' when loading 'StatsBombR'
** testing if installed package can be loaded from final location
Warning: replacing previous import 'jsonlite::flatten' by 'purrr::flatten' when loading 'StatsBombR'
Warning: replacing previous import 'foreach::when' by 'purrr::when' when loading 'StatsBombR'
Warning: replacing previous import 'foreach::accumulate' by 'purrr::accumulate' when loading 'StatsBombR'
** testing if installed package keeps a record of temporary installation path
* DONE (StatsBombR)
Warning message:
In file.copy(savedcopy, lib, recursive = TRUE) :
problem copying C:\Users\Ann Chisnell\AppData\Local\R\win-library\4.3\00LOCK\vctrs\libs\x64\vctrs.dll to C:\Users\Ann Chisnell\AppData\Local\R\win-library\4.3\vctrs\libs\x64\vctrs.dll: Permission denied