unique

0th

Percentile

Remove Duplicated Elements from a Collection

Provides the generic function unique and the S4 methods for itemMatrix. unique uses duplicated to return an itemMatrix with the duplicate elements removed.

Note that unique can also be used on collections of associations.

Keywords
manip
Usage
unique(x, incomparables = FALSE, ...)
Arguments
x

an object of class itemMatrix or associations.

further arguments (currently unused).

incomparables

currently unused.

Value

An object of the same class as x with duplicated elements removed.

See Also

duplicated, associations-class, itemMatrix-class

Aliases
  • unique
  • unique,associations-method
  • unique,itemMatrix-method
Examples
# NOT RUN {
data("Adult")

r1 <- apriori(Adult[1:1000], parameter = list(support = 0.5))
r2 <- apriori(Adult[1001:2000], parameter = list(support = 0.5))

## Note that this produces a collection of rules from two sets
r_comb <- c(r1, r2)
r_comb <- unique(r_comb)
r_comb

# }
Documentation reproduced from package arules, version 1.5-4, License: GPL-3

Community examples

Looks like there are no examples yet.