statsbomb / StatsBombR

This repository is an R package to easily stream StatsBomb data from the API using your log in credentials or from the Open Data GitHub repository cost free into R .
268 stars 74 forks source link

Novice with R - Please Help #6

Open creosc opened 4 years ago

creosc commented 4 years ago

Hello, I please need help getting started. It seems like R is the recommended path and I am following all instructions from the Statsbomb R ppt and the https://github.com/statsbomb/StatsBombR link. From what I can tell, the only issue I am having is with the StatsbombR package portion. Below is the error message I receive. Do I have to click on any of the packages previously downloaded in order to download this - such devtools? as Any advice will help greatly.

`> devtools::install_github("statsbomb/StatsBombR"); Downloading GitHub repo statsbomb/StatsBombR@master Downloading git repo https://github.com/cran/SDMTools.git √ checking for file 'C:\Users\USER' Surface\AppData\Local\Temp\Rtmp6H80rl\file247833b2144e/DESCRIPTION' (484ms)

preparing 'SDMTools': (851ms) √ checking DESCRIPTION meta-information ... cleaning src checking for LF line-endings in source and make files and shell scripts (377ms) checking for empty or unneeded directories building 'SDMTools_1.1-221.2.tar.gz' Installing package into ‘C:/Users/USER Surface/Documents/R/win-library/4.0’ (as ‘lib’ is unspecified)

installing source package 'SDMTools' ... using staged installation libs *** arch - i386 /mingw32/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c ConnectedComponentLabelling.c -o ConnectedComponentLabelling.o /mingw32/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c getmin.c -o getmin.o /mingw32/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c movewindow.c -o movewindow.o /mingw32/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c patchstats.c -o patchstats.o /mingw32/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c pointinpolygon.c -o pointinpolygon.o /mingw32/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c slope.aspect.c -o slope.aspect.o /mingw32/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c vincenty.geodesics.c -o vincenty.geodesics.o /mingw32/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c writeasciidata.c -o writeasciidata.o /mingw32/bin/gcc -shared -s -static-libgcc -o SDMTools.dll tmp.def ConnectedComponentLabelling.o getmin.o movewindow.o patchstats.o pointinpolygon.o slope.aspect.o vincenty.geodesics.o writeasciidata.o -LC:/PROGRA1/R/R-401.2/bin/i386 -lR installing to C:/Users/USER Surface/Documents/R/win-library/4.0/00LOCK-SDMTools/00new/SDMTools/libs/i386

* arch - x64 /mingw64/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c ConnectedComponentLabelling.c -o ConnectedComponentLabelling.o /mingw64/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c getmin.c -o getmin.o /mingw64/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c movewindow.c -o movewindow.o /mingw64/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c patchstats.c -o patchstats.o /mingw64/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c pointinpolygon.c -o pointinpolygon.o /mingw64/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c slope.aspect.c -o slope.aspect.o /mingw64/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c vincenty.geodesics.c -o vincenty.geodesics.o /mingw64/bin/gcc -I"C:/PROGRA1/R/R-401.2/include" -DNDEBUG -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c writeasciidata.c -o writeasciidata.o /mingw64/bin/gcc -shared -s -static-libgcc -o SDMTools.dll tmp.def ConnectedComponentLabelling.o getmin.o movewindow.o patchstats.o pointinpolygon.o slope.aspect.o vincenty.geodesics.o writeasciidata.o -LC:/PROGRA1/R/R-401.2/bin/x64 -lR installing to C:/Users/USER Surface/Documents/R/win-library/4.0/00LOCK-SDMTools/00new/SDMTools/libs/x64 R ** byte-compile and prepare package for lazy loading Error: unexpected symbol in "tools:::makeLazyLoading("SDMTools", 'C:/Users/USER Surface" Execution halted ERROR: lazy loading failed for package 'SDMTools'

removing 'C:/Users/USER Surface/Documents/R/win-library/4.0/SDMTools' Error: Failed to install 'StatsBombR' from GitHub: Failed to install 'unknown package' from Git: (converted from warning) installation of package ‘C:/Users/USER~1/AppData/Local/Temp/Rtmp6H80rl/file247837fd279/SDMTools_1.1-221.2.tar.gz’ had non-zero exit status

EkremBayar commented 4 years ago

I have same issue. :(

RobWHickman commented 4 years ago

(not part of the Statsbomb team) error seems to be because you have a space in your PC Username ('C:/Users/USER Surface/...") which R can't parse.

You could try

install.packages("StatsBombR", lib = "C:\\Program Files\\R\\R-VERSION.NUMBER.NUMBER\\library")

(or change the user name on your PC)

creosc commented 4 years ago

@RobWHickman Thank you for the solve! It appeared to have been the user/folder name which is harder to change that it ought to be. Now I just have to figure out how to properly work R and the Statsbomb info. If you have any additional insight that isnt already posted by the Statsbomb team, that would be excellent. Thank you for the huge huge help!!

@EkremBayar I created a new user account/user folder without spaces by following below https://support.microsoft.com/en-us/help/4026923/windows-10-create-a-local-user-or-administrator-account. It is a bit convoluted but at least it works.

EkremBayar commented 4 years ago

My pc username seems normal. I solved the problem with this code.

Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS="true") devtools::install_github("statsbomb/StatsBombR")

janpi25 commented 3 years ago

i have this problem

devtools::install_github("statsbomb/statsbombr") WARNING: Rtools is required to build R packages, but is not currently installed.

Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/. 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: stringi (1.6.1 -> 1.6.2) [CRAN] 5: curl (4.3.1 -> 4.3.2) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 1 stringi (1.6.1 -> 1.6.2) [CRAN] curl (4.3.1 -> 4.3.2) [CRAN] Installing 2 packages: stringi, curl Installing packages into ‘C:/Users/Jctha/Documents/R/win-library/4.1’ (as ‘lib’ is unspecified)

There are binary versions available but the source versions are later: binary source needs_compilation stringi 1.6.1 1.6.2 TRUE curl 4.3.1 4.3.2 TRUE

Binaries will be installed trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/stringi_1.6.1.zip' Content type 'application/zip' length 16348895 bytes (15.6 MB) downloaded 15.6 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/curl_4.3.1.zip' Content type 'application/zip' length 4248163 bytes (4.1 MB) downloaded 4.1 MB

package ‘stringi’ successfully unpacked and MD5 sums checked package ‘curl’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in C:\Users\Jctha\AppData\Local\Temp\RtmpOAvXtX\downloaded_packages WARNING: Rtools is required to build R packages, but is not currently installed.

Please download and install Rtools 4.0 from https://cran.r-project.org/bin/windows/Rtools/. √ checking for file 'C:\Users\Jctha\AppData\Local\Temp\RtmpOAvXtX\remotesb907319e31\statsbomb-StatsBombR-0aff8a0/DESCRIPTION' (652ms)

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

marcosnioac commented 2 years ago

I am having a problem too. Done all the install.packages stuff, but still getting this:

Downloading GitHub repo statsbomb/StatsBombR@HEAD Error: Failed to install 'StatsBombR' from GitHub: Git does not seem to be installed on your system.

What it could be? :(

AkshayKulkarn1 commented 2 years ago

I am having a problem too. Done all the install.packages stuff, but still getting this:

Downloading GitHub repo statsbomb/StatsBombR@HEAD Error: Failed to install 'StatsBombR' from GitHub: Git does not seem to be installed on your system.

What it could be? :(

Same thing ! Did you find any solution ?

andiyudha commented 2 years ago

I am having a problem too. Done all the install.packages stuff, but still getting this:

Downloading GitHub repo statsbomb/StatsBombR@HEAD Error: Failed to install 'StatsBombR' from GitHub: Git does not seem to be installed on your system.

What it could be? :(

I have been resolved this issue, with Installing Git first like this solution: https://github.com/Russel88/MicEco/issues/6