Description Usage Arguments Value Author(s) See Also Examples
View source: R/retrieveFunctionReturnTypes.R
From an instrumented class, retrieve the function return types definition.
1 | retrieveFunctionReturnTypes(object_o_1)
|
object_o_1 |
the object to consider |
A polymorphic return that is either
a list |
as returned by the |
another list |
as returned by the |
a data table |
the function parameter types definition as declared in the source class |
Fabien Gelineau <neonira@gmail.com>
Maintainer: Fabien Gelineau <neonira@gmail.com>
Refer to defineEvaluationModes
1 2 3 4 5 6 7 8 | ##---- typical case ----
library('data.table')
source(system.file('code-samples/no-defs/Addition.R',
package = 'wyz.code.offensiveProgramming'))
source(system.file('code-samples/frt-defs/good/full/AdditionFI.R',
package = 'wyz.code.offensiveProgramming'))
retrieveFunctionReturnTypes(AdditionFI()) # works, renders a data.table
retrieveFunctionReturnTypes(Addition()) # fails, renders a list
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.