ws: ws

Description Usage Arguments Examples

Description

An internal function used by extract_single_comment and extract_double_comment

Usage

1
ws(x)

Arguments

x

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
26
27
28
29
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (x) 
{
    if (inherits(x, "AddConstSingleRule")) {
        a1 = "Add"
        b1 = x@constantVal
    }
    if (inherits(x, "MultConstSingleRule")) {
        a1 = "Multiply the previous element of numeric sequence by"
        b1 = x@constantVal
    }
    if (inherits(x, "DigSumSingleRule")) {
        a1 = "Take sum of digits"
        b1 = NULL
    }
    if (inherits(x, "NegativeSingleRule")) {
        a1 = "Take a negative of the element"
        b1 = NULL
    }
    if (inherits(x, "IdenSingleRule")) {
        a1 = NULL
        b1 = NULL
    }
    return(list(a1, b1))
  }

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