yaml_quoted: Mark strings for quotation in 'yaml' serialization

View source: R/yaml_utils.R

yaml_quotedR Documentation

Mark strings for quotation in yaml serialization

Description

This function is designed for use with the yaml package to explicitly, It adds an attribute to character strings, indicating that they should be serialized with double quotes.

Usage

yaml_quoted(x)

Arguments

x

(character)

Examples

library(yaml)
yaml_quoted <- getFromNamespace("yaml_quoted", "teal.reporter")
yaml <- list(
  author = yaml_quoted("NEST"),
  title = yaml_quoted("Report"),
  date = yaml_quoted("07/04/2019"),
  output = list(pdf_document = list(keep_tex = TRUE))
)
as.yaml(yaml)

teal.reporter documentation built on April 3, 2025, 7:39 p.m.