Learn R Programming

ymlthis (version 0.1.7)

yml_blank: Return a blank object to be discarded from YAML

Description

ymlthis treats NULL, NA, and other common argument defaults as literal (e.g. author = NULL will produce "author: null"). yml_blank() is a helper function to indicate that the field should not be included. yml_blank() is primarily used as a default argument for fields that should not be included by default.

Usage

yml_blank()

is_yml_blank(x)

Value

a yml_blank object

Arguments

x

a field from a yml object

See Also

yml_discard(), yml_replace()

Examples

Run this code

yml() %>%
  yml_replace(author = yml_blank()) %>%
  yml_discard(~is_yml_blank(.x))


Run the code above in your browser using DataLab