NEONScience / NEON-utilities

Utilities and scripts for working with NEON data. Currently: an R package with functions to join (stack) the month-by-site files in downloaded NEON data, to convert data to geoCSV format, and to download data from the API.
GNU Affero General Public License v3.0
57 stars 36 forks source link

stackByTable not working when folder = FALSE #46

Closed Aariq closed 5 years ago

Aariq commented 5 years ago

stackByTable(here("data", "NEON", "NEON_count-small-mammals.zip"), folder = FALSE) doesn't work:

Error in utils::unzip(zipfile = zippath, exdir = outpath) : cannot open file '/Users/scottericr/Documents/Tufts/Research Projects/PLS Oecologia/data/NEON/NEON_count-small-mammals.zip/NEON.D06.UKFS.DP1.10072.001.2016-05.basic.20180613T025106Z.zip': Not a directory

But unzipping that folder and running stackByTable(here("data", "NEON", "NEON_count-small-mammals"), folder = TRUE) works. I've also reproduced this problem without using the here package.

> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.14.2

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] neonUtilities_1.0.1 here_0.1           

loaded via a namespace (and not attached):
 [1] httr_1.4.0      compiler_3.5.1  backports_1.1.3 R6_2.3.0        rprojroot_1.3-2 tools_3.5.1    
 [7] yaml_2.2.0      gdata_2.18.0    knitr_1.21      jsonlite_1.6    xfun_0.4        gtools_3.8.1  
cklunch commented 5 years ago

Thanks for the thorough documentation! This is a known issue with version 1.0.1, I'm close to releasing a new version but it isn't quite ready to go yet.

Can you confirm that if you install from GitHub, the bug is resolved? devtools::install_github("NEONScience/NEON-utilities/neonUtilities")

Since I'm still doing testing on the new version, getting it tested by other folks who've run into the bug is very helpful. Thanks!

Aariq commented 5 years ago

Yup, that fixes it. Thanks.