After writing data specification details in yaml format, read in as an object in R, query data set details, check / validate data sets, and write out data definition documents. To get started, check out the vignettes.

Workflow

  • Write your document in yaml format

    • Include a SETUP__: block at the top to include meta information

    • Use lookups from either the internal library or your own lookup file

    • Syntax reference here

    • Use ys_help to access examples

  • Use ys_load() to read in the yaml file

    • Use the .verbose to see more information while this is in progress

  • Once the spec object is loaded

  • Use ys_check() to check a data frame against the spec

  • Use ys_document() to render the specification object as a pdf file

  • Use ys_project() to create a collection of individual data specification objects; this also can be rendered as a pdf file with ys_document()

  • Get help: Use ys_help to get further help and documentation in your R session

Package-wide options

  • ys.sanitize a function to use for sanitizing text before processing with latex; see yspec::pander_table()

  • ys.col.len the maximum number of characters in a data frame column name; this defaults to 8 so that columns with 9 or more characters will generate an error on load.

  • ys.fct.suffix the suffix to add to a column name, used by yspec::yspec_add_factors()

  • ys.require.label if TRUE, an error will be generated whenever a column is specified without a label