ropensci / weathercan

R package for downloading weather data from Environment and Climate Change Canada
https://docs.ropensci.org/weathercan
GNU General Public License v3.0
102 stars 29 forks source link

Error with using weather_dl() #89

Closed emhodg closed 4 years ago

emhodg commented 4 years ago

There seems to be an issue with the weather_dl() function, when I use it to pull data from a specific station, e.g. weather_dl(station_ids = c(1648), start = "1990-01-01", end = "1991-01-01", interval = "day")

I get the following error:

Error in stringr::str_subset(., "^\r$", negate = TRUE) : unused argument (negate = TRUE)

I just downloaded the package, so am using the most recent version. Any suggestions would be appreciated. Thank you! I am very excited to try this package out.

boshek commented 4 years ago

👋 @emhodg

Can you please run sessionInfo() and paste that output here? I am unable to reproduce this - that is this bit of code works for me with R 3.61 and weathercan 0.3.1.

ebourlon commented 4 years ago

Looks like you have an old version of stringr installed. It happended to me when I installed the current weathercan package. The negate argument was added in stringr 1.4.0. You could update to the latest version of stringr by running: install.packages("stringr"). E.

Le mar. 15 oct. 2019 à 19:50, emhodg notifications@github.com a écrit :

There seems to be an issue with the weather_dl() function, when I use it to pull data from a specific station, e.g. weather_dl(station_ids = c(1648), start = "1990-01-01", end = "1991-01-01", interval = "day")

I get the following error:

Error in stringr::str_subset(., "^\r$", negate = TRUE) : unused argument (negate = TRUE)

I just downloaded the package, so am using the most recent version. Any suggestions would be appreciated. Thank you! I am very excited to try this package out.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ropensci/weathercan/issues/89?email_source=notifications&email_token=AGNA6HVMVIUUL57RCI7CD6DQOZCLJA5CNFSM4JBD6262YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HSAFD5Q, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGNA6HWAJQQMIH6QYUPCWE3QOZCLJANCNFSM4JBD626Q .

steffilazerte commented 4 years ago

That's really good to know! I'll increase the stringr version dependency to 1.4.0 to hopefully avoid future confusion. Thanks @ebourlon! @emhodg, can you confirm that this fixes your problem?

emhodg commented 4 years ago

Yes that is the fix! Thank you all for such quick responses. Much appreciated.