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.
yml_blank()
is_yml_blank(x)a field from a yml object
a yml_blank object
yml() %>%
yml_replace(author = yml_blank()) %>%
yml_discard(~is_yml_blank(.x))
#> ---
#> date: '`r format(Sys.Date())`'
#> ---
#>