bcgov / rems

An R package to access data from British Columbia's Environmental Monitoring System
Apache License 2.0
19 stars 5 forks source link

Errors on updating 2yr and 4yr ems data #53

Closed steffilazerte closed 3 years ago

steffilazerte commented 3 years ago
> library(rems)
> packageVersion("rems")
[1] ‘0.5.2’
> get_ems_data(ask = FALSE)
Downloading latest '2yr' EMS data from BC Data Catalogue (url: https://pub.data.gov.bc.ca/datasets/949f2233-9612-4b06-92a9-903e817da659/)
  |==============================================================================================================================| 100%

Error in if (ext == ".zip") { : missing value where TRUE/FALSE needed
In addition: Warning message:
In matrix(res, ncol = 2, byrow = TRUE) :
  data length [19] is not a sub-multiple or multiple of the number of rows [10]

I think this is related to the data set index containing "out.txt" which messes up the regex in get_databc_metadata()

I'm just preparing a pull request which I think fixes this (and the next warning I encountered where 4yr data has both zip and csv data options). Let me know if you need any edits, @ateucher, I'm sure you have a better handle on expected/planned internal changes than I do!