inspect-methods: Display Objects

inspect-methodsR Documentation

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 signature 'sequences'
inspect(x, setSep = ",", seqStart = "<", seqEnd = ">",
	decode = TRUE)

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

## S4 method for signature 'sequencerules'
inspect(x, setSep = ",", seqStart = "<", seqEnd = ">",
	ruleSep = "=>", decode = TRUE)


## S4 method for signature 'sequences'
labels(object, setSep = ",", seqStart = "<", seqEnd = ">",
       decode = TRUE, ...)

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

## S4 method for signature 'sequencerules'
labels(object, setSep = ",", seqStart = "<", seqEnd = ">", 
       ruleSep = " => ", decode = TRUE, ...)

## S4 method for signature '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.

Note

For compatibility with package arules the markup of itemsets is not customizable in the inspect methods.

For reasons of efficiency the reference set of distinct itemsets may contain unreferenced elements, e.g. after subsetting.

Author(s)

Christian Buchta

See Also

Class sequences, timedsequences, sequencerules, method subset.

Examples

## 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)

arulesSequences documentation built on Sept. 11, 2024, 9:35 p.m.