knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
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:
temp_get
cache_path
temp_get
to myspecificproject_get
)# install devtools if not found # install.packages(devtools) devtools::install_github("jsta/externalrdata")
library(externalrdata)
# for demonstration purposes we will set on-the-fly compilation to FALSE temp_get(version_id = "1", compile = FALSE)
temp_ls(version_id = "1")
# these files have metadata headers that need to be skipped temp_compile(version_id = "1", skip = c(16, 38))
temp_versions()
dt <- temp_load(version_id = "1") names(dt) lapply(dt, head)
Contributions welcome in the form of issues and pull requests.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.