Description Usage Arguments Details See Also
RGP internally infers the sTypes of compound expressions like function applications
and function definitions from the sTypes of atomic expressions. The sTypes of building
blocks are defined by the user via the %::% operator and are stored in the
package-internal global variable rgpSTypeEnvironment.
sType calculates the sType of the R expression x.
sTypeq quotes its argument x before calling sType.
SType inference of function definitions relies on a typed stack of formal arguments of
getSTypeFromFormalsStack and setSTypeOnFormalsStack get or set the sType
of a formal argument x and a formalsStack, respectively.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | sType(x, typeEnvir = rgpSTypeEnvironment, returnNullOnFailure = FALSE)
configureSTypeInference(constantSTypeFunction = NA)
calculateSTypeRecursive(x, typeEnvir = rgpSTypeEnvironment,
formalsStack = list(), returnNullOnFailure = FALSE)
sTypeq(x, typeEnvir = rgpSTypeEnvironment, returnNullOnFailure = FALSE)
getSTypeFromFormalsStack(x, formalsStack)
setSTypeOnFormalsStack(x, value, formalsStack)
hasStype(x)
x %::% value
|
x |
The object to operate on. |
value |
An sType. |
typeEnvir |
The type environment, containing user-supplied sTypes of building blocks. |
formalsStack |
A stack of formal arguments with their sTypes. |
returnNullOnFailure |
Return NULL on failure instead of stopping, defaults to FALSE. |
constantSTypeFunction |
A function of one parameter to be used to calculate constant types.
If set to |
The function configureSTypeInference is used to configure the type inference
engine for special needs.
sTypeConstructors
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.