lookupRule: internal

View source: R/lookupRule.R

lookupRuleR Documentation

internal

Description

internal

Usage

lookupRule(rules, strList)

Arguments

rules
strList

Value

rules that matched to strList

Examples

##---- 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 (rules, strList) 
{
    ix <- grep(strList[1], rules[, "condition"])
    if (length(strList) >= 2) {
        for (i in 2:length(strList)) {
            ix2 <- grep(strList[i], rules[, "condition"])
            ix <- intersect(ix, ix2)
        }
    }
    if (length(ix) >= 1) 
        return(rules[ix, , drop = FALSE])
    if (length(ix) == 0) 
        return(NULL)
  }

inTrees documentation built on June 1, 2022, 1:06 a.m.

Related to lookupRule in inTrees...