Learn R Programming

glmSTARMA (version 1.0.0)

load_data: Load example datasets

Description

Download and return datasets from the glmSTARMA GitHub repository

Usage

load_data(
  name = NULL,
  refresh = FALSE,
  directory = tools::R_user_dir("glmSTARMA", which = "data")
)

Value

A named list of objects

Arguments

name

Name of the dataset to load. One of "rota", "chickenpox", or "sst".

refresh

Logical; re-download the dataset if it already exists locally.

directory

Directory where the dataset should be cached. Defaults to a user-specific data directory of the glmSTARMA package.

Details

This function downloads example datasets from the glmSTARMA GitHub repository and caches them in a directory specified by the user. The default directory is a user-specific data directory of the glmSTARMA package. If the dataset has already been downloaded to the specified directory, it is loaded from the local cache unless refresh = TRUE is specified.

See Also

delete_glmSTARMA_data, rota, chickenpox, sst

Examples

Run this code
# \donttest{
# Load the 'chickenpox' dataset
chickenpox_data <- load_data("chickenpox", directory = tempdir())
str(chickenpox_data)
# }

Run the code above in your browser using DataLab