Learn R Programming

arulesSequences (version 0.2-1)

inspect-methods: Display Objects

Description

inspect displays a collection of (timed) sequences or sequence rules and their associated quality measures formatted for online inspection.

labels retrieves the string representations of a collection of (timed) sequences or sequence rules.

itemLabels gets the string representations of the set of distinct items or itemsets (elements) associated with a collection of sequences, or sets item labels.

Usage

## S3 method for class 'sequences':
inspect(x, setSep = ",", seqStart = "<", seqend=">" ,="" decode="TRUE)

## S3 method for class 'timedsequences': inspect(x, setSep = ",", seqStart = "<", seqend=">" ,="" decode="TRUE)

## S3 method for class 'sequencerules': inspect(x, setSep = ",", seqStart = "<", seqend=">" ,="" rulesep="=>" decode="TRUE)

## S3 method for class 'sequences': labels(object, setSep = ",", seqStart = "<", seqend=">" ,="" decode="TRUE," ...)<="" p="">

## S3 method for class 'timedsequences': labels(object, timeStart = "[", timeEnd = "]", setSep = ",", seqStart = "<", seqend=">" ,="" decode="TRUE," ...)="" <="" p="">

## S3 method for class 'sequencerules': labels(object, setSep = ",", seqStart = "<", seqend=">" ,="" rulesep=" => " decode="TRUE," ...)<="" p="">

## S3 method for class 'sequences': itemLabels(object, itemsets = FALSE, ...)

## S4 method for signature 'sequences, character': itemLabels(object) <- value

Arguments

x, object
an object.
setSep
a string value specifying the itemset (element) separator.
seqStart
a string value specifying the left sequence delimiter.
seqEnd
a string value specifying the right sequence delimiter.
ruleSep
a string value specifying the separator of the left-hand (antecedent) and the right-hand side (consequent) sequence.
timeStart
a string value specifying the left event time delimiter.
timeEnd
a string value specifying the right event time delimiter.
decode
a logical value specifying if the item indexes should be replaced by item labels.
itemsets
a logical value specifying the type of labels.
...
arguments specifying the markup of itemsets: itemSep = ",", setStart = "{", or setEnd = "}".
value
a character vector of length the number of items of object.

Value

  • For method inspect returns x invisibly. For method labels a character vector corresponding with the elements of x.

    For method itemLabels a character vector corresponding with the distinct items or itemsets of object.

See Also

Class sequences, timedsequences, sequencerules, method subset.

Examples

Run this code
## continue example
example(ruleInduction, package = "arulesSequences")

## stacked style
inspect(s2)
inspect(s2, setSep = "->", seqStart = "", seqEnd = "")

## economy style
labels(s2, setSep = "->", seqStart = "", seqEnd = "",
	   itemSep = "", setStart = "", setEnd = "")

## rules
inspect(r2)

## alternate style
labels(r2, ruleSep = "+ ")

## itemset labels
itemLabels(s2, itemsets = TRUE)
itemLabels(s2[reduce = TRUE], itemsets = TRUE)

## item labels
itemLabels(s2) <- tolower(itemLabels(s2))
itemLabels(s2)

## timed
z <- as(zaki, "timedsequences") 
labels(z)
inspect(z)

Run the code above in your browser using DataLab