arulesSequences (version 0.2-22)

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

# S4 method for sequences
inspect(x, setSep = ",", seqStart = "<", seqend=">" ,="" decode="TRUE)

# S4 method for timedsequences inspect(x, setSep = ",", seqStart = "<", seqend=">" ,="" decode="TRUE)

# S4 method for sequencerules inspect(x, setSep = ",", seqStart = "<", seqend=">" ,="" rulesep="=>" decode="TRUE)

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

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

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

# S4 method for 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
# NOT RUN {
## 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