# NOT RUN {
# Create a pointblank `informant`
# object with `create_informant()`;
# we specify a `read_fn` with the
# `~` followed by a statement that
# gets the `small_table` dataset
informant <-
create_informant(
read_fn = ~ small_table,
tbl_name = "small_table",
label = "An example."
)
# The `informant` object has the 'table'
# and 'columns' sections; we can create
# entirely different sections with their
# own properties using `info_section()`
informant <-
informant %>%
info_section(
section_name = "notes",
creation = "Dataset generated on (2020-01-15).",
usage = "`small_table %>% dplyr::glimpse()`"
)
# Upon printing the `informant` object, we see
# the addition of the 'Notes' section and its
# own information
# The `informant` object can be written to
# a YAML file with the `yaml_write()`
# function; then, information can
# be directly edited or modified
# yaml_write(
# informant = informant,
# filename = "informant.yml"
# )
# The YAML file can then be read back
# into an informant object with the
# `yaml_read_informant()` function
# informant <-
# yaml_read_informant(path = "informant.yml")
# }
Run the code above in your browser using DataLab