Learn R Programming

arules (version 0.1-3)

LIST: Creating a List Representation from Objects Based on ``itemMatrix''

Description

Provides the generic function LIST and the S4 method to create a list representation from objects based on itemMatrix (e.g., transactions, tidList, or itemsets). These methods are also used for the coercion to list.

Usage

LIST(from, ...)
## S3 method for class 'itemMatrix':
LIST(from, decode = TRUE)
## S3 method for class 'transactions':
LIST(from, decode = TRUE)
## S3 method for class 'tidList':
LIST(from, decode = TRUE)

Arguments

from
the object to be converted into a list.
...
further arguments are passed on.
decode
a logical controlling whether the items/transactions are decoded from the column numbers internally used by itemMatrix to the names stored in the object from. Th

Value

  • a "list" primitive.

Details

LIST returns the object from as a list of vectors. Each vector represents one row of the itemMatrix (e.g., items in a transaction or itemset).

See Also

itemMatrix-class

Examples

Run this code
data(Adult_transactions)

LIST(Adult_transactions[1:5])
LIST(Adult_transactions[1:5], decode = FALSE)

Run the code above in your browser using DataLab