Description Usage Arguments Value Author(s) See Also Examples
This generic function and its methods are used to
modify the expressions in the body of a function
in order to support the validation of type
information in calls to this function.
This changes the form of explicit calls to return
,
modifies the last expression if it is not an explicit call to return,
and adds an initial command to compute check the arguments in the cal
via checkArgs
.
1 | rewriteTypeCheck(f, doReturn = TRUE, checkArgs = TRUE, addInvisible = FALSE)
|
f |
the object which is to be modified to add the information for checking the return value and checking the input arguments. These are functions, expressions, calls, and other language objects. |
doReturn |
a logical value. If this is |
checkArgs |
a logical value indicating whether the modifications should including check the arguments. If the only type information given is about the return type, no checking of the arguments is necessary (in the current model). |
addInvisible |
logical indicating whether returned argument needs
to be cloaked in |
The potentially modified version of the original input argument. The modifications contain any necessary changes to support the type checking at run-time.
Duncan Temple Lang <duncan@wald.ucdavis.edu>
typeInfo
checkArgs
checkReturnValue
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.