View source: R/build_datasheet_path.R
build_datasheet_path | R Documentation |
Used as a helper by my other packages; automatically appends the date to the end of the file path (prefixed by an underscore)
build_datasheet_path(stem, base = NULL, date = NULL, ext = "csv")
stem |
character vector of file stems, without extension |
base |
root of file; i.e. directory where it should be saved. Defaults
to |
date |
date for collection, defaults to today's date |
ext |
file extension, defaults to "csv" but also accepts "tsv" or "xlsx"; period optional; accepts a character vector of multiple formats if desired |
character vector of paths with length matching that of the stem
argument
# sensible defaults allow for minimal typing
build_datasheet_path(stem = "my-precious-data")
# or write to tab-delimited file
build_datasheet_path(stem = "my-precious-data", ext = "tsv")
# or make many sheets at once using multiple stems and multiple formats
build_datasheet_path(stem = paste("my-precious-data", 1:3, sep = "-"))
# multiple formats can be created with one call
build_datasheet_path(stem = "my-precious-data", ext = c("csv", "tsv"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.