| abbreviate | R Documentation |
Provides the generic function and the methods to abbreviate long item labels
in transactions, associations (rules and itemsets) and transaction ID lists.
Note that abbreviate() is not a generic and this arules defines a
generic with the base::abbreviate() as the default.
abbreviate(names.arg, ...)
## S4 method for signature 'itemMatrix'
abbreviate(names.arg, minlength = 4, ..., method = "both.sides")
## S4 method for signature 'transactions'
abbreviate(names.arg, minlength = 4, ..., method = "both.sides")
## S4 method for signature 'rules'
abbreviate(names.arg, minlength = 4, ..., method = "both.sides")
## S4 method for signature 'itemsets'
abbreviate(names.arg, minlength = 4, ..., method = "both.sides")
## S4 method for signature 'tidLists'
abbreviate(names.arg, minlength = 4, ..., method = "both.sides")
names.arg |
an object of class transactions, itemMatrix, itemsets, rules or tidLists. |
... |
further arguments passed on to the default abbreviation function. |
minlength |
number of characters allowed in abbreviation |
method |
apply to level and value (both.sides) |
Sudheer Chelluboina and Michael Hahsler based on code by Martin Vodenicharov.
base::abbreviate()
Other associations functions:
associations-class,
c(),
duplicated(),
extract,
inspect(),
is.closed(),
is.generator(),
is.maximal(),
is.redundant(),
is.significant(),
is.superset(),
itemsets-class,
match(),
rules-class,
sample(),
sets,
size(),
sort(),
unique()
Other itemMatrix and transactions functions:
c(),
crossTable(),
duplicated(),
extract,
hierarchy,
image(),
inspect(),
is.superset(),
itemFrequency(),
itemFrequencyPlot(),
itemMatrix-class,
match(),
merge(),
random.transactions(),
sample(),
sets,
size(),
supportingTransactions(),
tidLists-class,
transactions-class,
unique()
data(Adult)
inspect(head(Adult, 1))
Adult_abbr <- abbreviate(Adult, 15)
inspect(head(Adult_abbr, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.