# 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 add more
# properties to the 'table' section
informant <-
informant %>%
info_tabular(
row_definition = "A row has randomized values.",
source = c(
"- From the **pointblank** package.",
"- [https://rich-iannone.github.io/pointblank/]()"
)
)
# Upon printing the `informant` object, we see
# the additions made to the 'Table' section
# 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