calculateSpecific: calculateSpecific

Description Usage Arguments Details Value Examples

Description

Every rule is an object of a class, which inherits either from SingleRule or DoubleRule virtual class. This is why for every rule there is a calculateSpecific method specifying how to transform arguments supplied to the calculate function.

Usage

1

Arguments

x

- an object of class SingleRule or DoubleRule

y

- first element of numeric sequence

z

- second element of numeric sequence

Details

argument z is ignored if x inherits from class SingleRule

Value

function returns a single value of class numeric

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
setClass("ExpDoubleRule", contains="DoubleRule",S3methods=TRUE)

setMethod("calculateSpecific", 
          signature(x="ExpDoubleRule", y="numeric", z="numeric"),
          function(x,y,z){
            return(y^z)
          })

## End(Not run)

ruleR documentation built on May 2, 2019, 5:49 p.m.