StacyByTable cannot open the zip file
Closed this issue · 4 comments
Function
Which of the functions in the neonUtilities package is this bug found in?
StackByTable
Describe the bug
A clear and concise description of what the bug is.
I wanted to unzip the Photosynthetically Active Radiation (PAR) (DP1.00024.001) data to follow the NEON data tutorial. I downloaded the file and then ran the StackByTable function which keeps failing with the following error message
zip file 'E/19_21141_Surasinghe/Bruce/Bridgewater/Research/NEON/NEON_par.zip' cannot be opened
To Reproduce
What function inputs revealed the bug?
library(neonUtilities)
neonUtilities::stackByTable(filepath = "E/19_21141_Surasinghe/Bruce/Bridgewater/Research/NEON/NEON_par.zip",
saveUnzippedFiles = T, dpID = DP1.00024.001)
I also ran the default script:
stackByTable("~E/19_21141_Surasinghe/Bruce/Bridgewater/Research/NEON/NEON_par.zip")
with no success
Expected behavior
A clear and concise description of what you expected to happen.
The zip file should be unzipped and all the resultant files should be merged
System (please complete the following information):
- OS: [Win]
- OS Version: [10]
- R Version: [e.g. 3.6.1]
Additional context
Add any other context about the problem here.
@tdlan80 Thank you for bringing this up in the webinar today. I am unable to replicate the error.
Looking into this, I believe the issue may be with the file path you are using. I'm assuming the "E" is the drive you have the data in, therefore, try:
stackByTable("E:/19_21141_Surasinghe/Bruce/Bridgewater/Research/NEON/NEON_par.zip")
I am pretty sure I tried that before (since I am not using the default home directory, I used the absolute path), let me give it a try again. I also called setwed to point to this as the working directory anyways.
@tdlan80 Is your computer auto-unzipping the downloaded file? Some Windows machines do that; if that's the situation, try:
stackByTable("E:/19_21141_Surasinghe/Bruce/Bridgewater/Research/NEON/NEON_par", folder=T)
Thank you for the feedback, the following script seems to work. stacking is taking longer since my data set is much larger.
library(neonUtilities)
neonUtilities::stackByTable(filepath ="E:/19_21141_Surasinghe/Bruce/Bridgewater/Research/NEON/NEON_par.zip", saveUnzippedFiles = T, dpID = DP1.00024.001)