[-methods

0th

Percentile

Methods for "[": Extraction or Subsetting in Package 'arules'

Methods for "[", i.e., extraction or subsetting in package arules. Subsetting can be done by integers containing column/row numbers, vectors of logicals or strings containing parts of item labels.

Keywords
array
Methods

[

signature(x = "itemMatrix", i = "ANY", j = "ANY", drop= "ANY"); extracts parts of an itemMatrix. The first argument selects rows (e.g., transactions or rules) and the second argument selects columns (items). Either argument can be omitted to select all rows or columns.

[

signature(x = "itemsets", i = "ANY", j = "ANY", drop= "ANY"); extracts a subset of itemsets and the associated quality measures. j has to be missing.

[

signature(x = "rules", i = "ANY", j = "ANY", drop= "ANY"); extracts a subset of rules and the associated quality measures. j has to be missing.

[

signature(x = "transactions", i = "ANY", j = "ANY", drop= "ANY"); extracts a subset of transactions/items from a transactions object (a binary incidence matrix). i and j can be numeric where i selects transactions and j selects items.

[

signature(x = "tidLists", i = "ANY", j = "ANY", drop= "ANY"); extracts parts (transaction ID vectors) from tidLists. i selects the items or itemsets and j selects transactions in the lists.

See Also

itemMatrix-class, itemsets-class, rules-class, transactions-class, tidLists-class

Aliases
  • [-methods
  • [,rules,ANY,ANY,ANY-method
  • [,itemsets,ANY,ANY,ANY-method
  • [,transactions,ANY,ANY,ANY-method
  • [,itemMatrix,ANY,ANY,ANY-method
  • [,tidLists,ANY,ANY,ANY-method
  • [,rules-method
  • [,itemsets-method
  • [,transactions-method
  • [,itemMatrix-method
  • [,tidLists-method
  • [,Matrix,ANY,ANY,ANY-method
  • [<-,Matrix,ANY,ANY,ANY-method
  • [<-,Matrix,missing,missing,ANY-method
  • [,Matrix,lMatrix,missing,ANY-method
  • [,Matrix,logical,missing,ANY-method
Examples
# NOT RUN {
data(Adult)
Adult

## select first 10 transactions
Adult[1:10]

## select first 10 items for first 100 transactions
Adult[1:100, 1:10]

## select the first 100 transactions for the items containing
## "income" or "age=Young" in their labels 
Adult[1:100, c("income=small", "income=large" ,"age=Young")]
# }
Documentation reproduced from package arules, version 1.5-4, License: GPL-3

Community examples

Looks like there are no examples yet.