MRCIEU / ieugwasr

R interface to the IEU GWAS database API
https://mrcieu.github.io/ieugwasr/
Other
67 stars 23 forks source link

Problem during 0.1.8 install: zzz.R:53:32: unexpected input 53: o <- lapply(b, \ #58

Closed osilander closed 3 months ago

osilander commented 3 months ago

Trying to install but get the following error (even though ChatGPT says last week's replacement code looks perfectly valid):

Downloading GitHub repo mrcieu/ieugwasr@HEAD
✔  checking for file ‘/dev/shm/jobs/44715411/Rtmpz77MFG/remotes1f9d732126f9e/MRCIEU-ieugwasr-f1d6d23/DESCRIPTION’ (675ms)
─  preparing ‘ieugwasr’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘ieugwasr_0.1.8.tar.gz’
   Warning: invalid uid value replaced by that for user 'nobody'
   Warning: invalid gid value replaced by that for user 'nobody'

Installing package into ‘/scale_wlg_persistent/filesets/home/osil929/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
* installing *source* package ‘ieugwasr’ ...
** using staged installation
** R
Error in parse(outFile) : 
  /dev/shm/jobs/44715411/RtmpDr3SpP/R.INSTALL23edf1472f53e/ieugwasr/R/zzz.R:53:32: unexpected input
52:                 }
53:                 o <- lapply(b, \
                                   ^
ERROR: unable to collate and parse R files for package ‘ieugwasr’
* removing ‘/scale_wlg_persistent/filesets/home/osil929/R/x86_64-pc-linux-gnu-library/4.0/ieugwasr’
Warning message:
In i.p(...) :
  installation of package ‘/dev/shm/jobs/44715411/Rtmpz77MFG/file1f9d714bf5634/ieugwasr_0.1.8.tar.gz’ had non-zero exit status

Cheers.

remlapmot commented 3 months ago

For some reason ieugwasr is failing to install on R 4.0.5 and earlier versions.

The quickest way to fix this is for you to update the version of R you are using to R 4.1.0 or later.

R 4.0.5 was released in 2021, so is almost 3 years old, so you don't want to be using such an old version of R anyway.

remlapmot commented 3 months ago

This is fixed in the development version of ieugwasr, so if you're still using R 4.0.5, you can install that with

remotes::install_github("MRCIEU/ieugwasr")