Nothing
imps_to_arules <- function(LHS, RHS, attributes, I, quality = TRUE) {
# Needed to export to arules
L <- .reduction(LHS = LHS, RHS = RHS, attributes = attributes)
LHS <- methods::as(L$lhs, "nMatrix")
LHS <- methods::as(LHS, "itemMatrix")
arules::itemLabels(LHS) <- attributes
RHS <- methods::as(L$rhs, "nMatrix")
RHS <- methods::as(RHS, "itemMatrix")
arules::itemLabels(RHS) <- attributes
rules <- methods::new("rules", lhs = LHS, rhs = RHS)
# This is needed in arules from version 1.6-6
# Solves issue #15 by Michael Hahsler
arules::info(rules) <- list(
data = "",
support = 0,
confidence = 1,
ntransactions = ncol(I)
)
if (quality) {
arules::quality(rules) <- arules::interestMeasure(
rules,
transactions = methods::as(methods::as(I, "nMatrix"), "transactions")
)
}
return(rules)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.