safe_read_yaml: safe_read_yaml

View source: R/safe_read_yaml.R

safe_read_yamlR Documentation

safe_read_yaml

Description

Wrapper for read_yaml that simplifies all null and missing data to NA. Creates front-matter.yml if not found

Usage

safe_read_yaml(
  yaml_path = NULL,
  WD = NULL,
  eval.expr = TRUE,
  checkWD = TRUE,
  auto_init = TRUE,
  standardize_NA = FALSE
)

Arguments

yaml_path

full path to the front-matter.yml file (usually in format '/users/lotsaSubfolders/gp-lessons/front-matter.yml')

WD

Google Drive Working Directory. Can use "?" to pass to parse_wd()

eval.expr

boolean; do you want to evaluate expression in yaml prepended with '!expr '? Default=TRUE

checkWD

do you want to run check_wd() which will produce warning messages if working directory assumptions aren't met?; default= TRUE

auto_init

logical; do you want to automatically create a front-matter.yml file if it's not found? Runs init_fm(); default=TRUE

standardize_NA

logical; do you want all "",NULL,list(), etc. to be read in as NA using is_empty()? default=FALSE


galacticpolymath/GPpub documentation built on April 5, 2025, 6:04 p.m.