parse_justifications | R Documentation |
This function is normally called by load_justifications()
; however,
sometimes it may be desirable to parse justifications embedded in more
complex objects, for example as provided by yum::load_and_simplify()
.
Therefore, this function can also be called directly.
parse_justifications( x, justifierFields = "^date$|^framework$", fromFile = NULL, path = NULL, storeDecisionGraphSvg = FALSE, silent = TRUE ) ## S3 method for class 'justifierDecisionGraph' print(x, ...) ## S3 method for class 'justifierDecisionGraph' plot(x, ...)
x |
An object resulting from a call to |
justifierFields |
Which fields to copy from |
fromFile |
The file from which the |
path |
The path holding these |
storeDecisionGraphSvg |
Whether to also produce (and return) the SVG for the decision graph. |
silent |
Whether to be chatty or quiet. |
... |
Additional arguments are passed on to |
While there is some flexibility in how justifications can be specified, they are most easily processed further if they all follow the same conventions. This function ensures this. The convention is as follows:
all specifications are provided in four 'flat' lists, named after the types of elements they contain;
all elements have a unique identifier
all references to other elements are indeed only references to the other elements' id's in these 'flat lists'
The parsed justifier
object.
### 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); ### Parse 'manually' parsedJustifications <- justifier::parse_justifications(loadedMinutes); ### Show contents names(parsedJustifications);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.