Description Usage Arguments Value Examples
View source: R/load_yaml_fragments.R
These function extracts all YAML fragments from a file and then
calls yaml::yaml.load()
to parse them. It then returns a list
of the parsed fragments.
1 2 3 4 5 6 7 8 9 10 |
text |
As |
file |
As |
yamlFragments |
A character vector of class |
select |
A vector of regular expressions specifying object names
to retain. The default ( |
delimiterRegEx |
The regular expression used to locate YAML fragments. |
ignoreOddDelimiters |
Whether to throw an error (FALSE) or delete the last delimiter (TRUE) if an odd number of delimiters is encountered. |
encoding |
The encoding to use when calling |
silent |
Whether to be silent ( |
A list of objects, where each object corresponds to one
YAML fragment from the source file or text. If the convention of
the rock
, dct
and justifier
packages is followed, each object
in this list contains one or more named objects (lists), where the
name indicated the type of information contained. Each of those
objects (lists) then contains one or more objects of that type,
such as metadata or codes for rock
, a decentralized construct
taxonomy element for dct
, and a justification for justifier
.
1 2 3 4 5 6 7 8 9 10 11 12 | yum::load_yaml_fragments(text="
---
-
id: firstFragment
---
Outside of YAML
---
-
id: secondFragment
parentId: firstFragment
---
Also outside of YAML");
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.