Learn R Programming

validate (version 0.1.4)

export_yaml: Export to yaml file

Description

Translate a validate object to yaml format and write to file.

Usage

export_yaml(x, file, ...)

as_yaml(x, ...)

## S3 method for class 'expressionset': export_yaml(x, file, ...)

## S3 method for class 'expressionset': as_yaml(x, ...)

Arguments

x
An R object
file
A file location or connection (passed to base::write).
...
Options passed to yaml::as.yaml

Examples

Run this code
v <- validator(x > 0, y > 0, x + y == z)
txt <- as_yaml(v)
cat(txt)


# NOTE: you can safely run the code below. It is enclosed in 'not run'
# statements to prevent the code from being run at test-time on CRAN
export_yaml(v, file="my_rules.txt")

Run the code above in your browser using DataLab