inst/doc/arules.R

## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.width = 7,
  fig.height = 5,
  warning = FALSE
)

## ----setup--------------------------------------------------------------------
library(arules)
library(fcaR)

## -----------------------------------------------------------------------------
data("Mushroom", package = "arules")

## -----------------------------------------------------------------------------
fc_planets <- FormalContext$new(planets)

## -----------------------------------------------------------------------------
fc <- FormalContext$new(Mushroom)
fc

## -----------------------------------------------------------------------------
fc_planets$to_transactions()

## -----------------------------------------------------------------------------
mushroom_rules <- apriori(Mushroom, parameter = list(conf = 1), control = list(verbose = FALSE))

## -----------------------------------------------------------------------------
fc$implications$add(mushroom_rules)

## -----------------------------------------------------------------------------
fc_planets$find_implications()
fc_planets$implications$to_arules(quality = TRUE)

Try the fcaR package in your browser

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

fcaR documentation built on April 28, 2023, 1:11 a.m.