to_specList | R Documentation |
This function is for internal use, but has been exported in case it's useful for people working 'manually' with lists of justifications.
to_specList(x, types, type, idsRequired = TRUE, silent = TRUE)
x |
The list to parse. |
types |
The class to assign to the specification
list (the |
type |
The class to assign to each specification
(in addition to |
idsRequired |
Whether to require identifiers. |
silent |
Whether to be chatty or silent. |
A list of classes c("justifierSpecList", types)
where
each element is a specification of class
c("justifierSpec", type)
.
### Specify an example text exampleFile <- system.file("extdata", "simple-example.jmd", package="justifier"); ### Show contents cat(readLines(exampleFile), sep="\n"); ### Load it with yum::load_and_simplify() loadedMinutes <- yum::load_and_simplify(exampleFile); ### Show contents names(loadedMinutes); ### Show classes class(loadedMinutes["assertion"]); ### Convert to specification list res <- to_specList(loadedMinutes["assertion"], type="assertion", types="assertions"); ### Show classes class(res); ### Show original and parsed objects loadedMinutes["assertion"]; res;
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.