simpler_import_data: Download Open Case Study Simpler Import Data

Description Usage Arguments Details Value Examples

View source: R/simpler_import_data.R

Description

Download the specified case study simpler import data to use as you follow along the case study.

Usage

1
simpler_import_data(casestudy, outpath = NULL)

Arguments

casestudy

character string, name of the case study to pull data from. The input name should follow the same naming scheme as the repository on GitHub:

ocs-bp-vaping-case-study

ocs-bp-opioid-rural-urban

ocs-bp-youth-disconnection

outpath

character string, path to the directory where the downloaded data folder should be saved to.

Details

This function downloads the Open Case Study simpler import data from GitHub and saves it in a new 'OCS_data/data/simpler_import/' folder in the specified directory. This makes it so all the simpler import data are easily available in a local folder to be processed and wrangled.

Value

If download is successful, the path to the downloaded data folder is printed and the logical value TRUE is returned. Otherwise the appropriate error message is printed.

Examples

1
2
3
tmp = tempfile()
dir.create(tmp)
simpler_import_data('ocs-bp-opioid-rural-urban', outpath = tmp)

OCSdata documentation built on Aug. 20, 2021, 9:07 a.m.