Write an initial data dictionary markdown file for a dataset
Source:R/write_dataset_dictionary.R
write_dataset_dictionary.RdCreates a Markdown data dictionary file for a dataset with one row per
column, pre-filled with placeholder descriptions. The file is intended to be
hand-edited, then read back (e.g. via readMDTable::read_md_table()) to
produce a curated dictionary for use with describe_dataset().
Usage
write_dataset_dictionary(
dataset,
path = "data-raw",
dataset_name = rlang::caller_arg(dataset),
open = rlang::is_interactive()
)Arguments
- dataset
(
data.frame) The dataset to document.- path
(
character(1)) Directory in which to write the file. Defaults to"data-raw".- dataset_name
(
character(1)) Base name used to construct the output filename ({dataset_name}_dictionary.md). Defaults to the name of the object passed asdataset.- open
(
logical(1)) Whether to open the file for editing after writing. Defaults toTRUEin interactive sessions.
Examples
tmp <- tempdir()
write_dataset_dictionary(mtcars, path = tmp, open = FALSE)