RWebServices (version 1.36.0)

RJavaSignature-class: String representations of R type signatures from R functions

Description

Class "RJavaSignature" contains elements of java-style function signature, including return type, function name, and argument names/types

Create this class using typeInfo2Java.

Arguments

Slots

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.

See Also

link{typeInfo2Java}

Examples

Run this code
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)

Run the code above in your browser using DataLab