Description Usage Details Value Author(s) See Also Examples
View source: R/FunctionParameterTypeFactory.R
This factory is a parameter type check factory. It provides type checking for each allowed type.
1 |
Many common types are already recorded and available through the factory. Use the function
getRecordedTypes to get more insight.
If you desire to verify a type instrumentation, just use checkSuffix function.
If you want to add an instrumentation for a new type, use addSuffix function.
See examples below for more hands-on approach.
An object that is an R environment.
Fabien Gelineau <neonira@gmail.com>
Maintainer: Fabien Gelineau <neonira@gmail.com>
Refer to defineEvaluationModes
1 2 3 4 5 6 7 8 9 10 | ##---- typical case ----
ff <- FunctionParameterTypeFactory()
ff$checkSuffix('b') # TRUE
# see verify_function recorded for 'boolean' entries
ff$getRecordedTypes()[suffix == 'b']$verify_function[[1]]
# record a new entry for suffix 'wo'
ff$addSuffix('wo', "wo class", function(o_) is(o, "wo")) # TRUE
ff$getRecordedTypes()[suffix == 'wo']
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.