Adds a sample set of twelve files, one for each month of 2017, to the specified path. These are not full data files; each file has twenty observations. They can be used to practice preparing, loading, standardizing, and collapsing data.

cs_example(path, overwrite = FALSE)

Arguments

path

File path where example data should be placed

overwrite

Overwrite files if they exist. If this is FALSE and the file exists an error will be thrown.

Examples

# create temporary directory tmpdir <- tempdir() fs::dir_create(paste0(tmpdir,"/data/")) # load sample files into temporary directory cs_example(path = paste0(tmpdir,"/data/")) # list files list.files(paste0(tmpdir,"/data/"))
#> [1] "April2017.CSV.html" "August2017.CSV.html" "December2017.CSV.html" #> [4] "February2017.CSV.html" "January2017.CSV.html" "July2017.CSV.html" #> [7] "June2017.CSV.html" "March2017.CSV.html" "May2017.CSV.html" #> [10] "November2017.CSV.html" "October2017.CSV.html" "September2017.CSV.html"
# delete data fs::dir_delete(paste0(tmpdir,"/data/"))