checkModule: checkModule

Usage Arguments Examples

Usage

1
checkModule(x, outputs = NULL)

Arguments

x
outputs

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
##---- 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, outputs = NULL) 
{
    platforms <- sapply(getNodeSet(x, "platform"), xmlValue)
    if (length(platforms)) {
        platformOK <- "R" %in% platforms
        cat("R in platforms\n")
    }
    else {
        platformOK <- TRUE
        cat("No platform specified\n")
    }
    if (platformOK) {
        inputs <- inputs(x)
        if (length(inputs)) {
            inputOK <- matchIO(outputs, inputs)
        }
        else {
            inputOK <- TRUE
            cat("No inputs specified\n")
        }
        if (inputOK) {
            modules <- getNodeSet(x, "module")
            if (length(modules)) {
                outputs <- outputs(x)
                all(sapply(modules, checkModule, outputs))
            }
            else {
                TRUE
            }
        }
        else {
            FALSE
        }
    }
    else {
        FALSE
    }
  }

bradleydrayton/pipeline documentation built on May 13, 2019, 2:27 a.m.