From bf9ac7eb138086605bd571e183f867ef2d87b093 Mon Sep 17 00:00:00 2001 From: Michael Hahsler Date: Tue, 27 Aug 2024 17:23:13 -0500 Subject: [PATCH] Started devel version. --- DESCRIPTION | 78 +++++++++++++++++++++++-------------------- NEWS.md | 2 ++ R/inspectDT.R | 5 +-- R/plot.R | 1 - R/ruleExplorer.R | 31 ++++++++--------- man/inspectDT.Rd | 27 --------------- man/plot_arulesViz.Rd | 1 - man/ruleExplorer.Rd | 19 +++++------ tests/testthat.R | 8 ----- 9 files changed, 65 insertions(+), 107 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1c896d1..23be241 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,48 +1,52 @@ Package: arulesViz -Version: 1.5.3 -Date: 2024-04-25 Title: Visualizing Association Rules and Frequent Itemsets +Version: 1.5.3-1 +Date: 2024-xx-xx Authors@R: c( - person("Michael", "Hahsler", role = c("aut", "cre", "cph"), - email = "mhahsler@lyle.smu.edu", - comment = c(ORCID = "0000-0003-2716-1405")), - person("Giallanza", "Tyler", role = c("ctb")), - person("Sudheer", "Chelluboina", role = c("ctb")) - ) -Depends: arules (>= 1.6.0) -Imports: graphics, - methods, - utils, - grDevices, - stats, - seriation, - grid, - vcd, - igraph, - scatterplot3d, - ggplot2, - ggraph, - tibble, - tidyr, - dplyr, - DT, - plotly, - visNetwork + person("Michael", "Hahsler", , "mhahsler@lyle.smu.edu", role = c("aut", "cre", "cph"), + comment = c(ORCID = "0000-0003-2716-1405")), + person("Giallanza", "Tyler", role = "ctb"), + person("Sudheer", "Chelluboina", role = "ctb") + ) +Description: Extends package 'arules' with various visualization + techniques for association rules and itemsets. The package also + includes several interactive visualizations for rule exploration. + Michael Hahsler (2017) . +License: GPL-3 +URL: https://github.com/mhahsler/arulesViz +BugReports: https://github.com/mhahsler/arulesViz/issues +Depends: + arules (>= 1.6.0) +Imports: + dplyr, + DT, + ggplot2, + ggraph, + graphics, + grDevices, + grid, + igraph, + methods, + plotly, + scatterplot3d, + seriation, + stats, + tibble, + tidyr, + utils, + vcd, + visNetwork Suggests: datasets, graph, + htmlwidgets, Rgraphviz, - tidygraph, shiny, shinythemes, - htmlwidgets, - testthat (>= 3.0.0) -Description: Extends package 'arules' with various visualization techniques for association rules and itemsets. The package also includes several interactive visualizations for rule exploration. Michael Hahsler (2017) . -License: GPL-3 + testthat (>= 3.0.0), + tidygraph +Config/testthat/edition: 3 +Copyright: (C) 2021 Michael Hahsler Encoding: UTF-8 -RoxygenNote: 7.3.1 Roxygen: list(markdown = TRUE) -URL: https://github.com/mhahsler/arulesViz -BugReports: https://github.com/mhahsler/arulesViz/issues -Copyright: (C) 2021 Michael Hahsler -Config/testthat/edition: 3 +RoxygenNote: 7.3.2 diff --git a/NEWS.md b/NEWS.md index b35dd8c..7150aef 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,5 @@ +# arulesViz 1.5.3-1 (xx/xx/2024) + # arulesViz 1.5.3 (04/25/2024) ## Changes diff --git a/R/inspectDT.R b/R/inspectDT.R index da2a44c..122f799 100644 --- a/R/inspectDT.R +++ b/R/inspectDT.R @@ -32,8 +32,7 @@ #' Association Rules with R. *R Journal,* 9(2):163-175. ISSN 2073-4859. #' \doi{10.32614/RJ-2017-047}. #' @keywords print -#' @examples -#' \dontrun{ +#' @examplesif requireNamespace("datatable", quietly = TRUE) #' data(Groceries) #' rules <- apriori(Groceries, parameter = list(support = 0.005, confidence = 0.5)) #' rules @@ -56,8 +55,6 @@ #' #' # clean up #' unlink(c("arules.html", "arules_files"), recursive = TRUE) -#' } -#' #' @export inspectDT <- function(x, ...) { UseMethod("inspectDT", x) diff --git a/R/plot.R b/R/plot.R index 124c848..57b5339 100644 --- a/R/plot.R +++ b/R/plot.R @@ -163,7 +163,6 @@ #' and Decision Analytics (DM-DA 2016). #' @keywords hplot #' @examples -#' #' # Note: To speed example execution, not all examples are not run when using example("plot"). #' # Use example("plot") to run all examples. #' diff --git a/R/ruleExplorer.R b/R/ruleExplorer.R index 5db9d51..0f392e2 100644 --- a/R/ruleExplorer.R +++ b/R/ruleExplorer.R @@ -29,34 +29,29 @@ #' @aliases ruleExplorer explore #' @param x a set of rules, a transactions object or a data.frame. #' @param sidebarWidth width of the sidebar as a number between 0 (= 0% of the -#' display width) and 12 (= 100% of the display width). +#' display width) and 12 (= 100% of the display width). #' @param graphHeight height of the plots in pixels. Increase if you have a -#' larger/higher resolution display. +#' larger/higher resolution display. #' @return returns a shiny app. #' @author Tyler Giallanza and Michael Hahsler. Adapted from functions -#' originally created by Andrew Brooks. See -#' [Rsenal](https://github.com/brooksandrew/Rsenal) for the original code. -#' @seealso [plot()] with `engine = "html"`, -#' [inspectDT()], [arules::apriori()]. +#' originally created by Andrew Brooks. See +#' [Rsenal](https://github.com/brooksandrew/Rsenal) for the original code. +#' @seealso [plot()] with `engine = "html"`, [inspectDT()], [arules::apriori()]. #' @references Hahsler M (2017). arulesViz: Interactive Visualization of -#' Association Rules with R. *R Journal,* 9(2):163-175. ISSN 2073-4859. -#' \doi{10.32614/RJ-2017-047}. -#' @examples -#' \dontrun{ +#' Association Rules with R. *R Journal,* 9(2):163-175. ISSN 2073-4859. +#' \doi{10.32614/RJ-2017-047}. +#' @examplesIf FALSE +#' # this example can only be run manually from the console. +#' +#' # explore pre-mined rules #' data(Groceries) -#' -#' # explore pre-mined rules -#' rules <- apriori(Groceries, -#' parameter = list(support = 0.001, confidence = 0.8) -#' ) -#' rules +#' rules <- apriori(Groceries, parameter = +#' list(support = 0.001, confidence = 0.8)) #' #' ruleExplorer(rules) #' #' # mine and explore rules on the fly -#' data(iris) #' ruleExplorer(iris) -#' } #' @export ruleExplorer <- function( diff --git a/man/inspectDT.Rd b/man/inspectDT.Rd index a5acb5f..e37190b 100644 --- a/man/inspectDT.Rd +++ b/man/inspectDT.Rd @@ -33,33 +33,6 @@ A datatable htmlwidget. \description{ Uses \pkg{datatable} to create a HTML table widget using the DataTables library. Rules can be interactively filtered and sorted. -} -\examples{ -\dontrun{ -data(Groceries) -rules <- apriori(Groceries, parameter = list(support = 0.005, confidence = 0.5)) -rules - -inspectDT(rules) - -# for more control on the data table, you can used DATAFRAME() to convert the rules. -rules_df <- DATAFRAME(rules, setStart = "", setEnd = "", itemSep = " + ") -rules_df$count <- NULL -head(rules_df) -inspectDT(rules_df) - -# Save HTML widget as web page -p <- inspectDT(rules) -htmlwidgets::saveWidget(p, "arules.html", selfcontained = FALSE) -# Note: self-contained seems to make the browser slow. - -# inspect the widget -browseURL("arules.html") - -# clean up -unlink(c("arules.html", "arules_files"), recursive = TRUE) -} - } \references{ Hahsler M (2017). arulesViz: Interactive Visualization of diff --git a/man/plot_arulesViz.Rd b/man/plot_arulesViz.Rd index d5a9b8d..2002746 100644 --- a/man/plot_arulesViz.Rd +++ b/man/plot_arulesViz.Rd @@ -171,7 +171,6 @@ coordinate plot. Currently there is no interactive version available. } } } \examples{ - # Note: To speed example execution, not all examples are not run when using example("plot"). # Use example("plot") to run all examples. diff --git a/man/ruleExplorer.Rd b/man/ruleExplorer.Rd index 98bac37..b5ea464 100644 --- a/man/ruleExplorer.Rd +++ b/man/ruleExplorer.Rd @@ -24,21 +24,19 @@ Explore association rules using interactive manipulations and visualization using \pkg{shiny}. } \examples{ -\dontrun{ -data(Groceries) +\dontshow{if (FALSE ) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +# this example can only be run manually from the console. -# explore pre-mined rules -rules <- apriori(Groceries, - parameter = list(support = 0.001, confidence = 0.8) -) -rules +# explore pre-mined rules +data(Groceries) +rules <- apriori(Groceries, parameter = + list(support = 0.001, confidence = 0.8)) ruleExplorer(rules) # mine and explore rules on the fly -data(iris) ruleExplorer(iris) -} +\dontshow{\}) # examplesIf} } \references{ Hahsler M (2017). arulesViz: Interactive Visualization of @@ -46,8 +44,7 @@ Association Rules with R. \emph{R Journal,} 9(2):163-175. ISSN 2073-4859. \doi{10.32614/RJ-2017-047}. } \seealso{ -\code{\link[=plot]{plot()}} with \code{engine = "html"}, -\code{\link[=inspectDT]{inspectDT()}}, \code{\link[arules:apriori]{arules::apriori()}}. +\code{\link[=plot]{plot()}} with \code{engine = "html"}, \code{\link[=inspectDT]{inspectDT()}}, \code{\link[arules:apriori]{arules::apriori()}}. } \author{ Tyler Giallanza and Michael Hahsler. Adapted from functions diff --git a/tests/testthat.R b/tests/testthat.R index 9c5ec5a..016987e 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -1,11 +1,3 @@ -# This file is part of the standard setup for testthat. -# It is recommended that you do not modify it. -# -# Where should you do additional test configuration? -# Learn more about the roles of various files in: -# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview -# * https://testthat.r-lib.org/articles/special-files.html - library(testthat) library(arulesViz)