import("arules")
import("grid") 
import("ggplot2")
#import("ggraph")
import("tibble")
import("tidyr")
# NOTE: dplyr has many NAMESPACE conflicts with arules so we use ::
#import("dplyr")

importFrom("graphics", "par", "mtext", "text", "axis", "box")
importFrom("stats", "median")
importFrom("methods", "is", "as", "new")

# Otherwise we get:  object 'guide_edge_colourbar' of mode 'function' was not found
# Note: has also an alias in man page plot
importFrom("ggraph", "guide_edge_colourbar")
export("guide_edge_colourbar")

importFrom("graphics", "plot")
S3method(plot, rules)
S3method(plot, itemsets)
S3method(plot, grouped_matrix)

export("inspectDT")
S3method(inspectDT, rules)
S3method(inspectDT, itemsets)
S3method(inspectDT, data.frame)

export(
  "ruleExplorer", 
  "saveAsGraph",
  "associations2igraph", 
  "rules2matrix", 
  "rules2groupedMatrix"
)