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

View source: R/datasets.R

datasetsR Documentation

Download a database extract from chronosphere remote server

Description

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

Usage

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

Arguments

src

character. Source identifier. If this is set to NULL, then a simplified list of availables series will be downloaded, including all unique src and ser combinations. If src is a valid source identifier, then all accessible products (resolutions and versions) of a series 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 src 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.

all

logical When set to FALSE (default), only those items are shown that are available for the R environment. Set to TRUE to see all items.

Details

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

Value

A data.frame class object.

Examples

# available datasets (sources and series) - proper
# index <- datasets()
# all available versions and resolutions in database 'pbdb'
# oneDat <- datasets(src="pbdb")
###################################
# local example INCOMPLETE - does not connect to the internet
ind <- datasets(
  datadir=system.file("extdata", package="chronosphere"))
# one available archive
ind <- datasets(
  src="SOM-zaffos-fragmentation",
  datadir=system.file("extdata", package="chronosphere"))

chronosphere documentation built on Aug. 17, 2023, 5:08 p.m.