From 24c1289b4ea6841abbc2677d1a849b6724f86540 Mon Sep 17 00:00:00 2001 From: Michael Hahsler Date: Fri, 26 Apr 2024 08:12:06 -0500 Subject: [PATCH] use md for man pages. CRAN release. --- .Rbuildignore | 2 +- R/ggraph.R | 3 ++- R/inspectDT.R | 4 ++-- R/plot.R | 24 ++++++++++++------------ R/ruleExplorer.R | 6 +++--- R/rules2matrix.R | 8 ++++---- R/saveAsGraph.R | 2 +- man/inspectDT.Rd | 2 +- man/ruleExplorer.Rd | 4 ++-- man/rules2matrix.Rd | 2 +- 10 files changed, 29 insertions(+), 28 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index 2ed293c..bb74faf 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -4,6 +4,6 @@ proj$ ^.*\.Rproj$ ^LICENSE README.Rmd -^Work/ +^Work ^_config\.yml ^\.github$ diff --git a/R/ggraph.R b/R/ggraph.R index d8fece8..a12e57f 100644 --- a/R/ggraph.R +++ b/R/ggraph.R @@ -39,8 +39,9 @@ graph_nodes_ggplot2 <- function( shading <- NULL } - # NULLify + # NULLify for checker label <- NULL + type <- NULL control <- c(control, list(...)) control <- .get_parameters( diff --git a/R/inspectDT.R b/R/inspectDT.R index e258e36..da2a44c 100644 --- a/R/inspectDT.R +++ b/R/inspectDT.R @@ -27,9 +27,9 @@ #' @param ... additional arguments are passed on to [`DT::datatable()`]. #' @return A datatable htmlwidget. #' @author Michael Hahsler -#' @seealso \code{\link[DT]{datatable}} in \pkg{DT}. +#' @seealso [DT::datatable()] in \pkg{DT}. #' @references Hahsler M (2017). arulesViz: Interactive Visualization of -#' Association Rules with R. \emph{R Journal,} 9(2):163-175. ISSN 2073-4859. +#' Association Rules with R. *R Journal,* 9(2):163-175. ISSN 2073-4859. #' \doi{10.32614/RJ-2017-047}. #' @keywords print #' @examples diff --git a/R/plot.R b/R/plot.R index 5273ea3..124c848 100644 --- a/R/plot.R +++ b/R/plot.R @@ -30,14 +30,14 @@ #' Most visualization techniques are described by Bruzzese and Davino (2008), #' however, we added more color shading, reordering and interactive features #' (see Hahsler, 2017). Many visualization methods take extra parameters as the -#' \code{control} parameter list. Although, we have tried to keep control +#' `control` parameter list. Although, we have tried to keep control #' parameters consistent, the available control parameters vary from -#' visualization method to visualization method. You can specift \code{"help"} -#' for \code{method}, \code{engine}, or \code{control} to get a list of +#' visualization method to visualization method. You can specift `"help"` +#' for `method`, `engine`, or `control` to get a list of #' available settings. #' #' Note on HTML widgets: HTML widgets tend to get very slow or unresponsive for -#' too many rules. To prevent this situation, the control parameter \code{max} +#' too many rules. To prevent this situation, the control parameter `max` #' sets a limit, and the user is warned if the limit is reached. #' #' The following visualization method are available: @@ -53,10 +53,10 @@ #' \item{"matrix"}{ Arranges the association rules as a matrix with the #' itemsets in the antecedents on one axis and the itemsets in the consequents #' on the other. The measure of interestingness (first element of -#' \code{measure}) is either visualized by a color (darker means a higher value +#' `measure`) is either visualized by a color (darker means a higher value #' for the measure) or as the height of a bar (engine "3d"). The control -#' parameter \code{reorder} takes the values \code{"none"}, \code{"measure"}, -#' \code{"support/confidence"}, or \code{"similarity"} and can be used to +#' parameter `reorder` takes the values `"none"`, `"measure"`, +#' `"support/confidence"`, or `"similarity"` and can be used to #' reorder LHS and RHS of the rules differntly. The default reordering average #' measure (typically lift) pushing the rules with the highest lift value to #' the top-left corner of the plot. } @@ -93,7 +93,7 @@ #' pointing to the item. } #' #' \item{"doubledecker", "mosaic"}{ Represents a single rule as a doubledecker -#' or mosaic plot. Parameter \code{data} has to be specified to compute the +#' or mosaic plot. Parameter `data` has to be specified to compute the #' needed contingency table. No interactive version is available. } #' #' \item{"paracoord"}{ Represents the rules (or itemsets) as a parallel @@ -114,13 +114,13 @@ #' @param measure measure(s) of interestingness (e.g., "support", "confidence", #' "lift", "order") used in the visualization. Some visualization methods need #' one measure, others take a vector with two measures (e.g., scatterplot). In -#' some plots (e.g., graphs) \code{NA} can be used to suppress using a measure. +#' some plots (e.g., graphs) `NA` can be used to suppress using a measure. #' @param shading measure of interestingness used for the color of the #' points/arrows/nodes (e.g., "support", "confidence", "lift"). The default is -#' "lift". \code{NULL} can be often used to suppress shading. +#' "lift". `NULL` can be often used to suppress shading. #' @param limit A limit on the number of associations displayed. The top limit #' associations according to the measure specified in shading are chosen. -#' @param interactive deprecated. See parameter \code{engine} below. +#' @param interactive deprecated. See parameter `engine` below. #' @param engine a string indicating the plotting engine used to render the #' plot. The "default" engine uses (mostly) \pkg{ggplot2}. Other engines #' include "base" (base R plots), "grid", "interactive", "plotly", @@ -135,7 +135,7 @@ #' Specify "help" to get a complete list of available control parameters and #' their default values. #' @param \dots Further arguments are added for convenience to the -#' \code{control} list. +#' `control` list. #' @return Several interactive plots return a set of selected rules/itemsets. #' Other plots might return other data structures. For example, graph-based #' plots return the graph (invisibly). Engine "htmlwidget" always returns an diff --git a/R/ruleExplorer.R b/R/ruleExplorer.R index 1c4b629..5db9d51 100644 --- a/R/ruleExplorer.R +++ b/R/ruleExplorer.R @@ -36,10 +36,10 @@ #' @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 \code{\link{plot}} with \code{engine = "html"}, -#' \code{\link{inspectDT}}, \code{\link[arules]{apriori}}. +#' @seealso [plot()] with `engine = "html"`, +#' [inspectDT()], [arules::apriori()]. #' @references Hahsler M (2017). arulesViz: Interactive Visualization of -#' Association Rules with R. \emph{R Journal,} 9(2):163-175. ISSN 2073-4859. +#' Association Rules with R. *R Journal,* 9(2):163-175. ISSN 2073-4859. #' \doi{10.32614/RJ-2017-047}. #' @examples #' \dontrun{ diff --git a/R/rules2matrix.R b/R/rules2matrix.R index c7a0e5f..fa8579b 100644 --- a/R/rules2matrix.R +++ b/R/rules2matrix.R @@ -35,16 +35,16 @@ #' @param lhs_label_items number of top items used to name LHS itemset groups #' (columns). #' @param ... passed on to [`arules::DATAFRAME()`]. -#' @return \code{rules2matrix} returns a matrix with quality values. +#' @return `rules2matrix` returns a matrix with quality values. #' -#' \code{rules2groupedMatrix} returns a list with elements +#' `rules2groupedMatrix` returns a list with elements #' \item{m}{ the #' grouped matrix for measure. } #' \item{m2}{ the grouped matrix for measure2. } #' \item{clustering_rules}{ vector with group assignment for each rule. } #' @author Michael Hahsler -#' @seealso \code{\link{plot}} for rules using \code{method = 'matrix'} and -#' \code{method = 'grouped matrix'}. +#' @seealso [plot()] for rules using `method = 'matrix'` and +#' `method = 'grouped matrix'`. #' @references Michael Hahsler and Radoslaw Karpienko. Visualizing association #' rules in hierarchical groups. Journal of Business Economics, 87(3):317--335, #' May 2016. \doi{10.1007/s11573-016-0822-8}. diff --git a/R/saveAsGraph.R b/R/saveAsGraph.R index fd9cc4a..a103f43 100644 --- a/R/saveAsGraph.R +++ b/R/saveAsGraph.R @@ -38,7 +38,7 @@ #' @param format file format (e.g., "edgelist", "graphml", "dimacs", "gml", #' "dot"). See [`igraph::write_graph()`]. #' @param ... further arguments are passed on to `associations2igraph()`. -#' @return \code{associations2igraph} returns an igraph object. +#' @return `associations2igraph` returns an igraph object. #' @author Michael Hahsler #' @keywords file #' @examples diff --git a/man/inspectDT.Rd b/man/inspectDT.Rd index bf7aa0f..a5acb5f 100644 --- a/man/inspectDT.Rd +++ b/man/inspectDT.Rd @@ -67,7 +67,7 @@ Association Rules with R. \emph{R Journal,} 9(2):163-175. ISSN 2073-4859. \doi{10.32614/RJ-2017-047}. } \seealso{ -\code{\link[DT]{datatable}} in \pkg{DT}. +\code{\link[DT:datatable]{DT::datatable()}} in \pkg{DT}. } \author{ Michael Hahsler diff --git a/man/ruleExplorer.Rd b/man/ruleExplorer.Rd index f31de94..98bac37 100644 --- a/man/ruleExplorer.Rd +++ b/man/ruleExplorer.Rd @@ -46,8 +46,8 @@ Association Rules with R. \emph{R Journal,} 9(2):163-175. ISSN 2073-4859. \doi{10.32614/RJ-2017-047}. } \seealso{ -\code{\link{plot}} with \code{engine = "html"}, -\code{\link{inspectDT}}, \code{\link[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/man/rules2matrix.Rd b/man/rules2matrix.Rd index f7252ab..90e54ee 100644 --- a/man/rules2matrix.Rd +++ b/man/rules2matrix.Rd @@ -82,7 +82,7 @@ rules in hierarchical groups. Journal of Business Economics, 87(3):317--335, May 2016. \doi{10.1007/s11573-016-0822-8}. } \seealso{ -\code{\link{plot}} for rules using \code{method = 'matrix'} and +\code{\link[=plot]{plot()}} for rules using \code{method = 'matrix'} and \code{method = 'grouped matrix'}. } \author{