Description Slots Author(s) See Also Examples
Class "RJavaSignature" contains elements of java-style function signature, including return type, function name, and argument names/types
Create this class using typeInfo2Java
.
returnType
Character string describing the return type of the function. This must be defined.
funcName
:Function name as character string.
args
:Vector of character strings providing argument types. Argument names are stored as name
attributes.
MT Morgan <mtmorgan@fhcrc.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | library(RWebServices)
oneWayAnova <- function( response, predictor ) {
if ( is.character( predictor ))
return( oneWayAnova( response, as.factor( predictor )))
formula <- as.formula( substitute( response ~ predictor ))
result <- lm( formula )
anova( result )
}
typeInfo(oneWayAnova) <-
SimultaneousTypeSpecification(
TypedSignature(
response = "numeric",
predictor = "factor"),
TypedSignature(
response = "numeric",
predictor = "character"),
returnType = "anova" )
res <- typeInfo2Java(oneWayAnova)
res
summary(res)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.