idRef {justifier} | R Documentation |
Create a reference to one or more justifier objects
Description
Create a reference to one or more justifier objects
Usage
idRef(x, what = NULL, silent = justifier::opts$get("silent"))
## S3 method for class 'singleJustifierElement'
idRef(x, what = NULL, silent = justifier::opts$get("silent"))
## S3 method for class 'multipleJustifierElements'
idRef(x, what = NULL, silent = justifier::opts$get("silent"))
## S3 method for class 'justifierIdRef'
idRef(x, what = NULL, silent = justifier::opts$get("silent"))
## S3 method for class 'character'
idRef(x, what = NULL, silent = justifier::opts$get("silent"))
## S3 method for class 'justifierStructured'
idRef(x, what = NULL, silent = justifier::opts$get("silent"))
Arguments
x |
The identifier(s) |
what |
Optionally, what |
silent |
Whether to be silent or chatty. |
Value
The justifier id reference object.
Examples
exampleSource <-
justifier::source("This is a book about R.");
exampleAssertion <- justifier::assert(
"R is a functional language",
source = justifier::idRef(exampleSource)
);
### Get and show the reference
(sourceId <- exampleAssertion$source);
sourceId <- as.character(sourceId);
### Manually assign an identifier
justifier::idRef(sourceId);
### Repeat while specifying what we're passing
justifier::idRef(sourceId, what="source");
[Package justifier version 0.2.6 Index]