Learn R Programming

chronosphere (version 0.4.1)

datasets: Download a database extract from chronosphere remote server

Description

The function will download a list of available data from the data repository

Usage

datasets(
  dat = NULL,
  datadir = NULL,
  verbose = FALSE,
  master = FALSE,
  greetings = TRUE
)

Value

A data.frame class object.

Arguments

dat

character. Database ID. If this is set to NULL, then a simplified list of availables variables will be downloaded, including all dat and var combinations. If dat is a valid database ID, then all accessible resolutions and version of a dataset are shown.

datadir

character Directory where the downloaded files are kept. Individual entries will be looked up from the directory if this is given, and will be downloaded if they are not found. The default NULL option will download data to a temporary directory that exists only until the R session ends.

verbose

logical Should console feedback during download be displayed?

master

logical When dat is NULL, should the function download the master records file?

greetings

logical When the function is invoked without arguments, it displays a message to keep new users informed about different versions and resolutions (even with verbose=FALSE). This argument turns this message off on demand.

Details

The function will download a single .csv file and attach it as a data.frame.

Examples

Run this code
# available datasets and variables - proper
# ind <- datasets()
# available datasets and variables
# just one example archive is available locally
ind <- datasets(
  datadir=system.file("extdata", package="chronosphere"))
# all available versions and resolutions in database 'paleomap'
# oneDat <- datasets("paleomap")

Run the code above in your browser using DataLab