RWebServices (version 1.36.0)

RJavaPkgFunctions-class: Java signatures derived from R methods

Description

Class RJavaPkgFunctions contains elements of Java signatures, including the source R package, the corresponding java class, and type information about the Java function.

Create this class using createMap or generateFunctionMap.

Arguments

Slots

rPackage
Character vector of R source packages
javaClass
Character vector of corresponding Java classes
javaTypeInfo
List of Java function signatures.

See Also

generateFunctionMap, createMap

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" )

## Not run: 
# res <- createMap("oneWayAnova", outputDirectory=tempdir(),
# typeMode="robject", verbose=TRUE)
# ## End(Not run)

Run the code above in your browser using DataLab