listWebData: Retrive file available to download.

Description Usage Arguments Value Author(s) Examples

Description

Produce a character vector of files available to download. It uses a preset data.table in which a list of relevant dataset name, their associate url and password are stored. To retrive available file, the function derive URL, and username/password using the datasetName.

Usage

1
listWebData(urlTbl, datasetName, dfile)

Arguments

urlTbl

A data.table that stores available dataset name, url, password and filenames found within each dataset. urlTbl is provided within the package as urls object.

datasetName

Character string. Represent the dataset of interest for download. datasetName allow to derived url and password from the urlTbl.

dfile

Character string representing filename of interest to download. When missing, all files from associated url given will be listed.

Value

Vector of url to download.

Author(s)

Melina Houle

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
dt <- data.table::data.table(
  dataset = c("NFDB"),
  url = c("http://cwfis.cfs.nrcan.gc.ca/downloads/nfdb/fire_poly/current_version/"),
  password = c(NA)
)
path2data <- listWebData(dt, datasetName = "NFDB", dfile = "NFDB_poly_20160712_metadata.pdf")

## End(Not run)

PredictiveEcology/webDatabases documentation built on May 8, 2019, 3:09 p.m.