antecedents: Extract antecedent-part (left-hand side) of rules in a list

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/antecedents.R

Description

Given a list of rules or an instance of the S3 farules() class, the function returns a list of their antecedents (i.e. left-hand side of rules).

Usage

1
antecedents(rules)

Arguments

rules

Either a list of character vectors or an object of class farules().

Details

This function assumes rules to be a valid farules() object or a list of character vectors where the first element of each vector is a consequent part and the rest is an antecedent part of rules. Function returns a list of antecedents.

Value

A list of character vectors.

Author(s)

Michal Burda

See Also

consequents(), farules(), searchrules()

Examples

1
2
    rules <- list(c('a', 'b', 'c'), c('d'), c('a', 'e'))
    antecedents(rules)

beerda/lfl documentation built on Oct. 17, 2020, 8:57 p.m.