Skip to content
This repository has been archived by the owner on Aug 26, 2020. It is now read-only.

Error in (rowheader + 1):(length(x) - 1) : argument of length 0 #10

Open
Schuch666 opened this issue Aug 25, 2020 · 1 comment
Open

Comments

@Schuch666
Copy link

Hi,

I'm trying to run the README.md example but I got this error wen trying to import data:

------------------------------
station: 83936
OK (HTTP 200).
Error in (rowheader + 1):(length(x) - 1) : argument of length 0

My code is:

stations <- c("Santa Maria", "Macapá")
stations_rows <- pmatch(stations, bdmep_meta$name)
stns_codes <- bdmep_meta[stations_rows, "id"] 
# the line that returns this error
met_data <- bdmep_import(id      = stns_codes,
                         sdate   = "01/01/2012", 
                         edate   = "01/02/2012",
                         destdir = 'C:/',
                         email   = "user@gmail.com",
                         passwd  = "666",
                         verbose = T)

Is this problem related to the code (in the example)? or with any change in the location or format of the data (I saw that the site has changed its address)?

Thank you,
Daniel

@lhmet
Copy link
Owner

lhmet commented Aug 26, 2020

Hello @Schuch666,
Inmet has changed the way to acces the bdmep. You can see it clicking the link below. They redirect you to a new URL.
This means that {inmet} will be retired (archived) very soon in GitHub. I hope you enjoyed it while it lasted. The new bdmep does everything by email. This makes it difficult to automate data retrieval.
Thanks for letting me know about the problem.

https://portal.inmet.gov.br/paginas/redirect?&mRelEstacao=83743&btnProcesso=serie&mRelDtInicio=01/01/1961&mRelDtFim=25/08/2020&mAtributos=1,1,1,1,1,1,1,1,1,1,1,1,1,,1,1,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants