RJavaPkgFunctions-class: Java signatures derived from R methods

Description Slots Author(s) See Also Examples

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.

Slots

rPackage

Character vector of R source packages

javaClass

Character vector of corresponding Java classes

javaTypeInfo

List of Java function signatures.

Author(s)

MT Morgan <mtmorgan@fhcrc.org>

See Also

generateFunctionMap, createMap

Examples

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

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

## End(Not run)

RWebServices documentation built on Oct. 5, 2016, 4:53 a.m.