Defines functions reorder

reorder <- function(LHS, RHS, attributes) {

  # Sizes of the LHS + size of the RHS
  # Remember: attributes are in rows, implications are
  # in columns.
  sizes <- Matrix::colSums(LHS) + Matrix::colSums(RHS)

  # Reorder the sizes:
  o <- order(sizes)

  # Return the reordered implications
  return(list(lhs = LHS[, o],
              rhs = RHS[, o]))


Try the fcaR package in your browser

Any scripts or data that you put into this service are public.

fcaR documentation built on June 29, 2021, 1:06 a.m.