extract | R Documentation |
Methods for "["
, i.e., extraction or subsetting for arules objects.
## 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]
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. |
Michael Hahsler
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()
,
c()
,
crossTable()
,
duplicated()
,
hierarchy
,
image()
,
inspect()
,
is.superset()
,
itemFrequency()
,
itemFrequencyPlot()
,
itemMatrix-class
,
match()
,
merge()
,
random.transactions()
,
sample()
,
sets
,
size()
,
supportingTransactions()
,
tidLists-class
,
transactions-class
,
unique()
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")]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.