diff --git a/DESCRIPTION b/DESCRIPTION index 581746d..25da130 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: rdwd Title: Select and Download Climate Data from 'DWD' (German Weather Service) -Version: 0.8.5 -Date: 2017-09-29 +Version: 0.8.6 +Date: 2017-11-02 Depends: R(>= 2.10) Imports: berryFunctions (>= 1.15.30), pbapply Suggests: RCurl, leaflet, knitr, rmarkdown, testthat, data.table diff --git a/NEWS b/NEWS index eec8733..3e6a246 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ rdwd ToDo-list / wishlist / issues - dataDWD: potentially use curl to download data without sleep need - selectDWD: if res/var/per is NA or "", give a selection popup - for per="monthly", make readDWD recognize MESS_DATUM_ENDE and _BEGINN, potentially create new column MESS_DATUM yyyy-mm-15 +- readDWD: figure out reason for fread trouble (reported in emails by some users) --------------------------------------- rdwd: DWD Climate Data access package by Berry Boessenkool, berry-b@gmx.de diff --git a/R/dataDWD.R b/R/dataDWD.R index 6bd199e..c511d84 100644 --- a/R/dataDWD.R +++ b/R/dataDWD.R @@ -99,7 +99,7 @@ #' only download is performed and the filename(s) returned. DEFAULT: TRUE #' @param meta Logical (vector): is the \code{file} a meta file? Passed to #' \code{\link{readDWD}}. DEFAULT: TRUE for each file ending in ".txt" -#' @param fread Fast reading? See \code{\link{readDWD}}. DEFAULT: NA +#' @param fread Fast reading? See \code{\link{readDWD}}. DEFAULT: FALSE #' @param format Char (vector): format used in \code{\link{strptime}} to convert date/time column, #' see \code{\link{readDWD}}. DEFAULT: NA #' @param ntrunc Single integer: number of filenames printed in messages @@ -117,7 +117,7 @@ progbar=!quiet, browse=FALSE, read=TRUE, meta=substr(file, nchar(file)-3, 1e4)==".txt", -fread=NA, +fread=FALSE, format=NA, ntrunc=2, ... diff --git a/R/readDWD.R b/R/readDWD.R index f62bfc9..9f5e180 100644 --- a/R/readDWD.R +++ b/R/readDWD.R @@ -28,7 +28,8 @@ #' DEFAULT: TRUE for each file ending in ".txt" #' @param fread Logical: read faster with \code{data.table::\link[data.table]{fread}}? #' For 30 daily/kl/hist files, 7 instead of 10 seconds. -#' DEFAULT: NA, which means TRUE if data.table is available. +#' NA can also be used, which means TRUE if data.table is available. +#' DEFAULT: FALSE #' @param minfo Logical: read the meta info txt files in the zip folder (instead of actual data)? #' Returns a named list of data.frames. DEFAULT: FALSE #' @param format Char (vector), only used if \code{meta=FALSE}: Format passed to @@ -47,7 +48,7 @@ readDWD <- function( file, meta=substr(file, nchar(file)-3, 1e4)==".txt", -fread=NA, +fread=FALSE, minfo=FALSE, format=NA, tz="GMT", diff --git a/man/dataDWD.Rd b/man/dataDWD.Rd index cae5beb..3534c52 100644 --- a/man/dataDWD.Rd +++ b/man/dataDWD.Rd @@ -7,7 +7,7 @@ dataDWD(file, dir = "DWDdata", force = FALSE, overwrite = FALSE, sleep = 0, quiet = FALSE, progbar = !quiet, browse = FALSE, read = TRUE, meta = substr(file, nchar(file) - 3, 10000) == ".txt", - fread = NA, format = NA, ntrunc = 2, ...) + fread = FALSE, format = NA, ntrunc = 2, ...) } \arguments{ \item{file}{Char (vector): complete file URL(s) (including base and filename.zip) as returned by @@ -43,7 +43,7 @@ only download is performed and the filename(s) returned. DEFAULT: TRUE} \item{meta}{Logical (vector): is the \code{file} a meta file? Passed to \code{\link{readDWD}}. DEFAULT: TRUE for each file ending in ".txt"} -\item{fread}{Fast reading? See \code{\link{readDWD}}. DEFAULT: NA} +\item{fread}{Fast reading? See \code{\link{readDWD}}. DEFAULT: FALSE} \item{format}{Char (vector): format used in \code{\link{strptime}} to convert date/time column, see \code{\link{readDWD}}. DEFAULT: NA} diff --git a/man/readDWD.Rd b/man/readDWD.Rd index 49717ce..85d52a6 100644 --- a/man/readDWD.Rd +++ b/man/readDWD.Rd @@ -5,7 +5,8 @@ \title{Process data from the DWD CDC FTP Server} \usage{ readDWD(file, meta = substr(file, nchar(file) - 3, 10000) == ".txt", - fread = NA, minfo = FALSE, format = NA, tz = "GMT", progbar = TRUE) + fread = FALSE, minfo = FALSE, format = NA, tz = "GMT", + progbar = TRUE) } \arguments{ \item{file}{Char (vector): name(s) of the file(s) downloaded with \code{\link{dataDWD}}, @@ -17,7 +18,8 @@ DEFAULT: TRUE for each file ending in ".txt"} \item{fread}{Logical: read faster with \code{data.table::\link[data.table]{fread}}? For 30 daily/kl/hist files, 7 instead of 10 seconds. -DEFAULT: NA, which means TRUE if data.table is available.} +NA can also be used, which means TRUE if data.table is available. +DEFAULT: FALSE} \item{minfo}{Logical: read the meta info txt files in the zip folder (instead of actual data)? Returns a named list of data.frames. DEFAULT: FALSE}