Closed datacarvel closed 4 years ago
Hmm, I can't replicate the problem which makes me think it might be a weird package dependency issue (assuming you're using the most recent version of weathercan
v0.3.4). These are super hard to track down, but can usually be fixed by updating packages.
1) Try updating weathercan
to the most recent version (if it's not already):
install.packages('weathercan')
If that doesn't help, try updating your packages that weathercan
depends on:
remotes::update_packages("weathercan", dependencies = TRUE)
If that doesn't help, try updating all your packages:
remotes::update_packages()
Please let me know what (if anything) helped!
Well now I don't feel super smart 😂 weathercan was just not updated, it resolved the issue. Been using R for a while now but still don't have the reflex to check the package version. Anyway, thanks a lot for this quick reply and solution!
Glad that worked out! I've been using R for about 13 years now and you'd be surprised how often package versions throw me for a loop :grin:
Expected Behavior
_I am simply trying to download weather data using the weatherdl() function. I am guessing it should return the data.
Current Behavior
I try downloading data with the provided example in the doc, but even this does not work and returns an error :
kam <- weather_dl(station_ids = 51423, start = "2016-01-01", end = "2016-02-15")
Error message :Error in 1:grep("Date/Time", preamble$V1) : argument of length 0
Steps to Reproduce (for bugs)
See above
Possible Solution
Context
I am trying to download hourly weather data for a few stations in Quebec, ideally from January 2017 to today.
Your Environment
`- Session info ---------------------------------------------------------------------------------------------------------------------------- setting value
version R version 3.5.2 (2018-12-20) os Windows >= 8 x64
system x86_64, mingw32
ui RStudio
language (EN)
collate French_Canada.1252
ctype French_Canada.1252
tz America/New_York
date 2020-04-23
assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.5.3) backports 1.1.3 2018-12-14 [1] CRAN (R 3.5.2) callr 3.4.3 2020-03-28 [1] CRAN (R 3.5.3) cli 2.0.2 2020-02-28 [1] CRAN (R 3.5.3) crayon 1.3.4 2017-09-16 [1] CRAN (R 3.5.2) desc 1.2.0 2018-05-01 [1] CRAN (R 3.5.3) devtools 2.3.0 2020-04-10 [1] CRAN (R 3.5.3) digest 0.6.25 2020-02-23 [1] CRAN (R 3.5.3) ellipsis 0.3.0 2019-09-20 [1] CRAN (R 3.5.3) fansi 0.4.0 2018-10-05 [1] CRAN (R 3.5.2) fs 1.4.1 2020-04-04 [1] CRAN (R 3.5.3) glue 1.4.0 2020-04-03 [1] CRAN (R 3.5.3) magrittr 1.5 2014-11-22 [1] CRAN (R 3.5.2) memoise 1.1.0 2017-04-21 [1] CRAN (R 3.5.3) pkgbuild 1.0.6 2019-10-09 [1] CRAN (R 3.5.3) pkgload 1.0.2 2018-10-29 [1] CRAN (R 3.5.3) prettyunits 1.0.2 2015-07-13 [1] CRAN (R 3.5.3) processx 3.4.2 2020-02-09 [1] CRAN (R 3.5.3) ps 1.3.0 2018-12-21 [1] CRAN (R 3.5.3) R6 2.4.0 2019-02-14 [1] CRAN (R 3.5.2) remotes 2.1.1 2020-02-15 [1] CRAN (R 3.5.3) rlang 0.4.5 2020-03-01 [1] CRAN (R 3.5.3) rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.5.3) rstudioapi 0.11 2020-02-07 [1] CRAN (R 3.5.3) sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.5.3) testthat 2.3.2 2020-03-02 [1] CRAN (R 3.5.3) usethis * 1.6.0 2020-04-09 [1] CRAN (R 3.5.3) withr 2.1.2 2018-03-15 [1] CRAN (R 3.5.3) yaml 2.2.0 2018-07-25 [1] CRAN (R 3.5.2)
[1] C:/Users/scarufel/Documents/R/win-library/3.5 [2] C:/Program Files/R/R-3.5.2/library`