Last chance! 50% off unlimited learning
Sale ends in
Provides the generic function LIST()
and the methods to create a
list representation from objects of the classes itemMatrix,
transactions, and tidLists.
LIST(from, ...)# S4 method for itemMatrix
LIST(from, decode = TRUE)
# S4 method for transactions
LIST(from, decode = TRUE)
# S4 method for tidLists
LIST(from, decode = TRUE)
a list primitive.
the object to be converted into a list.
further arguments.
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
. The default behavior is to decode.
Michael Hahsler
Using LIST()
with decode = TRUE
is equivalent to the standard
coercion as(x, "list")
. LIST
returns the object from
as a list of vectors. Each vector represents one row of the
itemMatrix (e.g., items in a transaction).
Other import/export:
DATAFRAME()
,
pmml
,
read
,
write()
data(Adult)
### default coercion (same as as(Adult[1:5], "list"))
LIST(Adult[1:5])
### coercion without item decoding
LIST(Adult[1:5], decode = FALSE)
Run the code above in your browser using DataLab