retrieveFunctionReturnTypes {wyz.code.offensiveProgramming} | R Documentation |
Retrieve function return types
Description
Retrieve the function return type definitions from an object
.
Usage
retrieveFunctionReturnTypes(object_o_1)
Arguments
object_o_1 |
the |
Value
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 |
Author(s)
Fabien Gelineau <neonira@gmail.com>
Maintainer: Fabien Gelineau <neonira@gmail.com>
See Also
Refer to defineEvaluationModes
.
Examples
##---- 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
[Package wyz.code.offensiveProgramming version 1.1.24 Index]