2

I am unable to install a package from GitHub. SCCRWP/ASCI. This is a model for assessing stream health using algal community composition. First my session info:

- Session info ------------------------------------------------------------------------------
 setting  value
 version  R version 4.1.3 (2022-03-10)
 os       Windows 10 x64 (build 19044)
 system   x86_64, mingw32
 ui       RStudio
 language (EN)
 collate  English_United States.1252
 ctype    English_United States.1252
 tz       America/Los_Angeles
 date     2022-06-28
 rstudio  2022.02.3+492 Prairie Trillium (desktop)
 pandoc   NA

I will run the following:

library(devtools)
curl::ie_proxy_info()
install_github('SCCWRP/ASCI')

I have to run curl: whenever I use an API or github due to work's system settings. I get the following error message.

Downloading GitHub repo SCCWRP/ASCI@HEAD
SCCWRP-ASCI-82bd614/mmilkup.RData: truncated gzip input
tar.exe: Error exit delayed from previous errors.
Error: Failed to install 'ASCI' from GitHub:
  Does not appear to be an R package (no DESCRIPTION)
In addition: Warning messages:
1: In utils::untar(tarfile, ...) :
  ‘tar.exe -xf "C:\Users\nmack\AppData\Local\Temp\RtmpOcZ5L9\file53d87e726d5b.tar.gz" -C "C:/Users/nmack/AppData/Local/Temp/RtmpOcZ5L9/remotes53d8228135e9"’ returned error code 1
2: In system(cmd, intern = TRUE) :
  running command 'tar.exe -tf "C:\Users\nmack\AppData\Local\Temp\RtmpOcZ5L9\file53d87e726d5b.tar.gz"' had status 1

I contacted the package's author and was advised to download the repo and install locally. I received an error when installing locally stating that a dependency was missing. Upon installing the missing dependency I was successful => open the .Rproj file => hitting 'ctrl+shft+b'. The problem did not lie in the missing dependency since I am still unable to install with install_github('SCCWRP/ASCI'). The same error above returns. The author above(do not know his SOF handle) gave me two links of similar issues. NOAA/VAST and SOF. From reading the resolution in one case it would seem a reduced DESCRIPTION would be a solution. The author replied, "I reduced the Description line in the DESCRIPTION file in the ASCI package to one line, so it would be interesting to see if you get the same error again", but I am getting the same error.

Not sure if this matters, but I can not seem to install from a .zip either. When I run:

install.packages("C:/Users/nmack/Downloads/ASCI-master.zip", repos = NULL, type = "win.binary")

I get a quick flash, no error message/notice and no package installed.

  • 1
    Is it taking too long to download the .tar.gz? I.e. the request cannot be completed in time and the file is truncated. Perhaps try `options(timeout=600)` then try `library(devtools); curl::ie_proxy_info(); install_github('SCCWRP/ASCI')` again – jared_mamrot Jun 28 '22 at 23:03
  • @jared_mamrot. I tried the suggestion above but had the same result. I receive the error within 30 seconds typically. – Nathan Mack Jun 28 '22 at 23:08
  • at the github site code page, copy the location, upper right. in a browser, git clone (the site), then R CMD build ASCI, should put something like ASCI.tar.gz. Then R CMD INSTALL (copy and paste output of R CMD build ... – Chris Jun 28 '22 at 23:10
  • I always get timed out by devtools so I do the approach described above. – Chris Jun 28 '22 at 23:15
  • When you say "Upon installing the missing dependency I was successful => open the .Rproj file => hitting 'ctrl+shft+b'.", does that mean you have successfully installed the package but you still want to work out why the `install_github()` method fails? Do you get the same error installing an older version? E.g. `install_github('SCCWRP/ASCI@v2.3.5')`? – jared_mamrot Jun 28 '22 at 23:19
  • I guess I am a novice @Chris. Could you spoon feed me those steps? – Nathan Mack Jun 28 '22 at 23:20
  • If you cloned the entire repo, and are able to open the .proj file, and sucessfully installed using ctrl-shift-B, what exactly is the problem? – langtang Jun 28 '22 at 23:20
  • @jared_mamrot. You are correct. I have the package installed successfully. I would like to know why installing with install_github() does not function for me. I just tried the older version as you suggested. Same error. About 43 secs. Sorry if asking this was a waste of people's time. – Nathan Mack Jun 28 '22 at 23:22
  • Ahh, that makes sense. I misunderstood when I first read your question, and I suspect Chris / langtang also missed that part of the question and are trying to help with 'workarounds'. If your problem is purely the `install_github()`, there are lots of potential causes. Another idea is to try the [remotes package](https://github.com/r-lib/remotes), i.e. `install.packages("remotes"); remotes::install_github("SCCWRP/ASCI")` (in case there's something 'wrong' with your devtools) – jared_mamrot Jun 28 '22 at 23:31
  • 3
    There's likely nothing wrong with your devtools per se, except getting timed out. That said, 1) copy the git address to clipboard (https://github.com/SCCWRP/ASCI.git), 2) decide where you want to clone it to then `git clone https://github.com/SCCWRP/ASCI.git`. 3) `R CMD build ASCI`, and wait, if successful a ASCI.tar.gz, perhaps ASCI.zip is produced (i'm in linux), then, at the same prompt 4) `R CMD INSTALL ASCI `-- for your future use in event of getting timed out with other desired packages, as ASCI is now properly installed. – Chris Jun 28 '22 at 23:42
  • @jared_mamrot I have installed other packages successfully with install_github(), including 'remotes' recently. Chris, ASCI is pretty large. Time out may be my problem Posting was to see if the community thought the issue is caused by my system or with ASCI, possibly the DESCRIPTION? The author suggested I reach out to the community. I appreciate your attention – Nathan Mack Jun 29 '22 at 00:54
  • 1
    Yep, sorry @NathanMack, I can't replicate the problem so it's difficult to troubleshoot. Based on everything you've tried, I suspect it's an issue with your system rather than an issue with the package. Sorry I couldn't be any more help. – jared_mamrot Jun 29 '22 at 03:20

0 Answers0