### R code from vignette source 'vignettes/RWebServices/inst/doc/RToJava.Rnw' ################################################### ### code chunk number 1: RToJava.Rnw:72-73 ################################################### options(width=60) ################################################### ### code chunk number 2: simplestFunc ################################################### square <- function(x) { return(x^2) } square(10) ################################################### ### code chunk number 3: simplestTypeInfo ################################################### library(TypeInfo) STS <- SimultaneousTypeSpecification TS <- TypedSignature typeInfo(square) <- STS(TS(x = "numeric"), returnType = "numeric") ################################################### ### code chunk number 4: simplestTypeInfoQuery ################################################### typeInfo(square) ################################################### ### code chunk number 5: simplestRWebServices (eval = FALSE) ################################################### ## library(CaAffy) ## RJavaSignature(c(caAffy)) ################################################### ### code chunk number 6: classUnionEg ################################################### setClass("A", "logical") setClass("B", "character") setClassUnion("C", c("A","B")) ################################################### ### code chunk number 7: S4-limits ################################################### setClass("D", representation=representation(x="numeric")) setClass("E", contains="D", representation=representation(y="numeric"))