Skip to contents

Save a cleaned data object, consistent with the manydata universe, ready to be lazy-loaded and create scripts for documenting and testing that object within the new package.

Usage

export_data(..., database, URL)

Arguments

...

Unquoted name of the dataset object to save.

database

Quoted name of any existing database or of the database to be created.

URL

website URL to the source of a dataset.

Value

This function saves the dataset to the named database, silently creates a set of tests for this dataset, and creates and opens documentation for the dataset.

Details

The function creates a data directory, if nonexistent, and saves cleaned data. The functions also creates a script for testing the cleaned data and make sure it complies with manydata requirements. As well, it creates a documentation script to help documenting data sources and describing variables. Note that users need to provide a .bib file for citation purposes alongside their dataset in the corresponding data-raw subfolder.

Examples

if (FALSE) {
export_data(COW, database = "states",
URL = "https://correlatesofwar.org/data-sets/state-system-membership")
}