knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

externalrdata

Project Status: Active - The project has reached a stable, usable state and is being actively developed. Travis-CI Build Status

This package is a template R package to fetch, cache, and serve data from external sources. All data sources are assumed to be csv files. The typical workflow would be to fork this package and rename the project-specific pieces including:

Installation

# install devtools if not found
# install.packages(devtools)
devtools::install_github("jsta/externalrdata")

Usage

library(externalrdata)

Download external data and store in file system

# for demonstration purposes we will set on-the-fly compilation to FALSE
temp_get(version_id = "1", compile = FALSE)

List files

temp_ls(version_id = "1")

Compile version

# these files have metadata headers that need to be skipped
temp_compile(version_id = "1", skip = c(16, 38))

List versions

temp_versions()

Load data

dt <- temp_load(version_id = "1")
names(dt)
lapply(dt, head)

Examples

Uses this template

Uses as similar strategy

Contributing

Contributions welcome in the form of issues and pull requests.



jsta/externalrdata documentation built on Oct. 16, 2023, 4:51 a.m.