rdwd package error: invalid file argument raised by readDWD

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

rdwd package error: invalid file argument raised by readDWD

Jurat Shayidin
Hi:

I tried to download germany' historical weather data with rdwd package.
However, when I tried to read downloaded data (1080 txt file in total) with
readDWD function, but R raised an error down below:

library(rdwd)

ftpURL <- selectDWD(name = "", exactmatch = TRUE,
                    res="monthly",
                    var="kl", per="historical", current = TRUE)
ftpFile <- dataDWD(file = ftpURL, dir = "stella/input/",sleep = 0)


> fooDat <- readDWD(ftpFile,
+                   meta = substr(ftpFile, nchar(ftpFile) - 3, 10000) ==
".txt",
+                   fread = FALSE, minfo = FALSE, format = NA, tz = "GMT",
+                   progbar = TRUE)
*Error in file.exists(file) : invalid 'file' argument*


I want to read all txt file in R for further analysis. But I got an error
above. How to resolve this error? Any instance help? Thank you.

PS: here is my session information:

> sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] rdwd_0.9.0

loaded via a namespace (and not attached):
[1] compiler_3.4.3        parallel_3.4.3        tools_3.4.3
[4] berryFunctions_1.16.3 RCurl_1.95-4.8        abind_1.4-5
[7] yaml_2.1.14           pbapply_1.3-4         bitops_1.0-6


--
Jurat Shahidin

Dipartimento di Elettronica, Informazione e Bioingegneria
Politecnico di Milano
Piazza Leonardo da Vinci 32 - 20133 Milano, Italy
Mobile : +39 327-859-7796

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.