R/recommend_attribute.R

Defines functions .recommend_attribute

.recommend_attribute <- function(S, LHS, RHS,
                                 attribute_filter,
                                 attributes) {

  # Compute closure
  S <- .compute_closure(S, LHS, RHS,
                        attributes = attributes)

  # Which attributes are seeked
  idx <- match(attribute_filter, attributes)

  # Return the recommendation for those attributes
  rec <- S$closure[idx]
  names(rec) <- attribute_filter

  return(rec)

}

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.