ropensci / rnoaa

R interface to many NOAA data APIs
https://docs.ropensci.org/rnoaa
Other
328 stars 85 forks source link

unexpected non-zero exit status #420

Closed Vokhirion closed 11 months ago

Vokhirion commented 11 months ago

I was trying to install microclima and mcera5 but both are stucking on rnoaa. When I trying to install rnoaa with install.packages or install_github same showing itself;

Installing`` package into ‘/home/vokhirion/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/rnoaa_1.4.0.tar.gz'
Content type 'application/x-gzip' length 4220965 bytes (4.0 MB)
==================================================
downloaded 4.0 MB

* installing *source* package ‘rnoaa’ ...
** package ‘rnoaa’ successfully unpacked and MD5 sums checked
** using staged installation
** R
Error in parse(outFile) : 
  /tmp/RtmpoQbsx9/R.INSTALL500532ddf2a4/rnoaa/R/vis_miss.R:68:11: unexpected '>'
67: 
68:   d <- d |>
              ^
ERROR: unable to collate and parse R files for package ‘rnoaa’
* removing ‘/home/vokhirion/R/x86_64-pc-linux-gnu-library/4.0/rnoaa’
Warning in install.packages :
  installation of package ‘rnoaa’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpF7JZWv/downloaded_packages’

I didn't understand or couldn't find on internet what am I doing wrong, can you help me please?

My OS is LMDE5, Rversion 4.0.4, Rstudio build 421

djhocking commented 11 months ago

I forgot that the native pipe operator |> was not introduced in R until 4.1.0 (I though it was with 4.0 so didn't update the R depends version). You will have to update R for this package to work. Be aware though that this package is no longer being maintained and will be deprecated because NOAA changed all the APIs so rnoaa is unable to pull newer data from from most sources. Most functions still work through to pull data up to about a year ago. A replacement package is slowly starting but needs to be built completely from scratch because of these changes.