Learn R Programming

ymlthis (version 0.1.7)

as_yml: Convert to yml object

Description

as_yml is a wrapper for yaml::yaml.load() that stores YAML as a yml object, which prints cleanly to the console and is easy to work with using ymlthis functions.

Usage

as_yml(x)

Value

a yml object

Arguments

x

An object, either a character vector of length 1 or list, to convert to yml.

Examples

Run this code

x <- as_yml("
  author: Hadley Wickham
  date: '2014-09-12'
  title: Tidy Data
  keywords:
  - data cleaning
  - data tidying
  - relational databases
  - R")

  x

  x %>%
    yml_subtitle("Hadley's Tidy Data Paper")

Run the code above in your browser using DataLab