download.content: Download files from the FTP server of the DWD

Description Usage Arguments Details Value Author(s)

View source: R/download.R

Description

Downloads the content of the supplied URLs. It is intended to work with URLs pointing at folders on the FTP.

Usage

1
2
download.content(url, download.folder = NULL, quiet = FALSE,
  debug = FALSE)

Arguments

url

Either a character vector of one or more URLs to folders on the FTP server of the DWD or the output of the get.dwd.ftp.url function.

download.folder

Manual override for the default download folder of the package. If NULL, the default value will be used instead. Default = NULL.

quiet

Whether or not to verbose the download procedure. Default = FALSE.

debug

If TRUE is enables verbose messages of the individual downloads. Default = FALSE.

Details

The main reason why to use this function over the wget, which is used internally for the download, is that it is automatically updates your data.

When downloading content for the first time, the function reproduces the directory tree on the FTP server of the DWD and puts the specified files in the corresponding subfolders. Whenever the function is invoked another time, it compares the content of the folders in the URLs with the one of the corresponding local folders. All deleted files will be removed, new files will be downloaded, and all the others will stay untouched, which saves a lot of time when updating your data base.

The folder, which will contain all the source files downloaded from the FTP server of the DWD, will be set via option( "dwd2r.download.path" ). Per default it is set to the R/dwd_data folder in your home. If you wish to change this default path, you have to override this option in your .Rprofile configuration file in your home. In addition, the download folder can be supplied manually using the download.folder argument.

Value

Returns a character vector containing all directories data was written to terminated by a '/'.

Author(s)

Philipp Mueller


theGreatWhiteShark/dwd2r documentation built on May 22, 2019, 2:26 p.m.