View source: R/retrieveFunctionReturnTypes.R
retrieveFunctionReturnTypes | R Documentation |
Retrieve the function return type definitions from an object
.
retrieveFunctionReturnTypes(object_o_1)
object_o_1 |
the |
A polymorphic return that is either
a |
as returned by the |
another |
as returned by the |
a |
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
.
##---- 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.