extract {arules} | R Documentation |
Methods for "[": Extraction or Subsetting arules Objects
Description
Methods for "["
, i.e., extraction or subsetting for arules objects.
Usage
## S4 method for signature 'itemMatrix,ANY,ANY,ANY'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'transactions,ANY,ANY,ANY'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'tidLists,ANY,ANY,ANY'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'rules,ANY,ANY,ANY'
x[i, j, ..., drop = TRUE]
## S4 method for signature 'itemsets,ANY,ANY,ANY'
x[i, j, ..., drop = TRUE]
Arguments
x |
an object of class itemMatrix, transactions or associations. |
i |
select rows/sets using an integer vector containing row numbers or a logical vector. |
j |
select columns/items using an integer vector containing column numbers (i.e., item IDs), a logical vector or a vector of strings containing parts of item labels. |
... |
further arguments are ignored. |
drop |
ignored. |
Author(s)
Michael Hahsler
See Also
Other associations functions:
abbreviate()
,
associations-class
,
c()
,
duplicated()
,
inspect()
,
is.closed()
,
is.generator()
,
is.maximal()
,
is.redundant()
,
is.significant()
,
is.superset()
,
itemsets-class
,
match()
,
rules-class
,
sample()
,
sets
,
size()
,
sort()
,
unique()
Other itemMatrix and transactions functions:
abbreviate()
,
crossTable()
,
c()
,
duplicated()
,
hierarchy
,
image()
,
inspect()
,
is.superset()
,
itemFrequencyPlot()
,
itemFrequency()
,
itemMatrix-class
,
match()
,
merge()
,
random.transactions()
,
sample()
,
sets
,
size()
,
supportingTransactions()
,
tidLists-class
,
transactions-class
,
unique()
Examples
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")]