downloadSource {madrat}R Documentation

downloadSource

Description

Download a source. The function is a wrapper for specific functions designed for the different possible source types.

Usage

downloadSource(type, subtype = NULL, overwrite = FALSE, numberOfTries = 300)

Arguments

type

source type, e.g. "IEA". A list of all available source types can be retrieved with function getSources("download").

subtype

For some sources there are subtypes of the source, for these source the subtype can be specified with this argument. If a source does not have subtypes, subtypes should not be set.

overwrite

Boolean deciding whether existing data should be overwritten or not.

numberOfTries

Integer determining how often readSource will check whether a running download is finished before exiting with an error. Between checks readSource will wait 30 seconds. Has no effect if the sources that should be read are not currently being downloaded.

Note

The underlying download-functions are required to provide a list of information back to downloadSource. Following list entries should be provided:

This user-provided data is enriched by automatically derived metadata:

Besides the names above (user-provided and automatically derived) it is possible to add custom metadata entries by extending the return list with additional, named entries.

Author(s)

Jan Philipp Dietrich, David Klein, Pascal Führlich

See Also

setConfig, readSource

Examples

## Not run: 
a <- downloadSource("Tau", subtype = "historical")

## End(Not run)

[Package madrat version 3.6.4 Index]