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

Description Slots Author(s) See Also Examples

Description

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

Create this class using typeInfo2Java.

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.

Author(s)

MT Morgan <[email protected]>

See Also

link{typeInfo2Java}

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

res <- typeInfo2Java(oneWayAnova)

res

summary(res)

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