Read YAML from a file or text string
read_yaml.RdRead YAML from a file or text string
Arguments
- x
The path to the file or the text contents
- encoding
The encoding opf the file
- rlWarn
Whether to let
readLines()warn if a text file is missing a final EOL or if there are embedded NULs in the file.
Value
The R object with the data in the YAML file (see yaml::read_yaml()
Examples
examplePath <-
system.file(
"extdata",
package="clairvoyant"
);
exampleFile <-
file.path(
examplePath,
"assertion---somePrevalenceEstimate_2024_mr4n.yml"
);
exampleObject <-
clairvoyant::read_yaml(
exampleFile
);