NEONScience/NEON-utilities

stackByTable reading wrong dpID

Closed this issue · 1 comments

Function
stackByTable

Describe the bug
Following the tutorial https://www.neonscience.org/get-started-neon-series > Stack the downloaded data files: stackByTable() and using the 3 most recent records from the NIWO site in the PAR dataset (DP1.00024.001) I am generating the error:

stackByTable("data/NEON_par.zip")

Error in stackByTable("data/NEON_par.zip") : 
  D10.RMNP.DP1. is not a properly formatted data product ID. The correct format is 
DP#.#####.001, where the first placeholder must be between 1 and 4.

In this example the code is selecting the wrong string as the dpID value.

If I then hard code the dpID, I receive the same error message:

stackByTable("data/NEON_par.zip", dpID = 'DP1.00024.001') 

Error in stackByTable("data/NEON_par.zip") : 
  D10.RMNP.DP1. is not a properly formatted data product ID. The correct format is 
DP#.#####.001, where the first placeholder must be between 1 and 4.

If I then manually unzip the folder, keeping all things stated above the same, the function works.

stackByTable("data/NEON_par", folder=TRUE, dpID = 'DP1.00024.001') # finally works

Expected behavior
I expected any of these three calls would have unzipped and stacked the specified data. Only the last example worked, when I manually unzipped the file folder.

System (please complete the following information):

  • OS: macOS Mojave
  • OS Version: 10.14.6
  • R Version: 3.6.1 (2019-07-05)

dpID is no longer a required input for stackByTable, it is included only for back compatibility. Including it in the function call makes no difference.

I have never been able to replicate this error.

However, this is apparently fixed in the new release, without any detected side effects.