Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

filter.rules

Filtering a set of rules


Description

This function facilitate the selection of a subset from a set of rules.

Usage

filter.rules(
  rules,
  pattern = NULL,
  left = pattern,
  right = pattern,
  removeMatches = FALSE
)

Arguments

rules

A set of rules.

pattern

A pattern to match (antecedent and consequent): a character string.

left

A pattern to match (antecedent only): a character string.

right

A pattern to match (consequent only): a character string.

removeMatches

A logical indicating whether to remove matching rules (TRUE) or to keep those (FALSE).

Value

The filtered set of rules.

See Also

Examples

require ("arules")
data ("Adult")
r = apriori (Adult)
filter.rules (r, right = "marital-status=")
subset (r, subset = rhs %pin% "marital-status=")

fdm2id

Data Mining and R Programming for Beginners

v0.9.5
GPL-3
Authors
Alexandre Blansché [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.