Learn R Programming

arules (version 0.1-3)

transactions-class: Class ``transactions'' --- Binary Incidence Matrix for Transactions

Description

The transactions class represents transaction data used for mining itemsets or rules. It is a direct extension of class itemMatrix to store a binary incidence matrix, item labels, and optionally transaction IDs and user IDs.

Arguments

Objects from the Class

Objects are created by coercion from objects of other classes or by calls of the form new("transactions", ...).

Extends

Class itemMatrix, directly.

See Also

itemMatrix-class

Examples

Run this code
data <- list(
      c("a","b","c"),
      c("a","b"),
      c("a","b","d"),
      c("c","e"),
      c("a","b","d","e"),
      )

names(data) <- paste("Tr",c(1:5), sep = "")

### coerce data into transactins
trans <- as(data, "transactions")

### analyze transactions
summary(trans)
image(trans)

Run the code above in your browser using DataLab