datasets: Download a database extract from 'chronosphere' remote server

Description Usage Arguments Details Value Examples

View source: R/fetching.R

Description

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

Usage

1
2
3
4
5
6
7
datasets(
  dat = NULL,
  datadir = NULL,
  verbose = FALSE,
  master = FALSE,
  greetings = TRUE
)

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.

Value

A data.frame class object.

Examples

1
2
3
4
5
6
7
8
# 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")

chronosphere documentation built on April 19, 2021, 1:07 a.m.