Learn R Programming

arulesSequences (version 0.2-8)

support-methods: Support Counting for Sequences

Description

Compute the relative or absolute support of an arbitrary collection of sequences among a set of transactions with additional sequence and temporal information.

Usage

## S3 method for class 'sequences':
support(x, transactions, type= c("relative", "absolute"),
           control = NULL)

Arguments

x
an object.
transactions
an object of class transactions or sequences.
type
a character value specifying the scale of support (relative or absolute).
control
a named list with logical component verbose specifying if progress and runtime information should be displayed.

Value

  • Returns a numeric vector the elements of which correspond with the elements of x.

See Also

Class sequences, method ruleInduction, function cspade, read_baskets.

Examples

Run this code
## continue example
example(cspade)

## recompute support
s <- support(s2, zaki, control = list(verbose = TRUE))
cbind(as(s2, "data.frame"), upper = s)

## the same
s <- supportingTransactions(s2, zaki)
itemFrequency(s)

Run the code above in your browser using DataLab