From d31008a3b6b71a91492825429c107a3250af5d9e Mon Sep 17 00:00:00 2001 From: Victor Perrier Date: Fri, 25 Oct 2024 13:13:06 +0200 Subject: [PATCH] cran remarks --- DESCRIPTION | 2 +- R/reexports.R | 67 ++++++++++++++++++++++++++++++++++++++++++++++ R/vchart-package.R | 39 --------------------------- 3 files changed, 68 insertions(+), 40 deletions(-) create mode 100644 R/reexports.R diff --git a/DESCRIPTION b/DESCRIPTION index 00a12e1..10e6e54 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: vchartr -Title: Interactive Charts with the JavaScript 'VChart' Library +Title: Interactive Charts with the 'JavaScript' 'VChart' Library Version: 0.1.2 Authors@R: c( person("Victor", "Perrier", email = "victor.perrier@dreamrs.fr", role = c("aut", "cre")), diff --git a/R/reexports.R b/R/reexports.R new file mode 100644 index 0000000..1d4f3fa --- /dev/null +++ b/R/reexports.R @@ -0,0 +1,67 @@ + +#' Pipe operator +#' +#' See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details. +#' +#' @name %>% +#' @rdname pipe +#' @keywords internal +#' @export +#' @importFrom magrittr %>% +#' @usage lhs \%>\% rhs +#' @param lhs A value or the magrittr placeholder. +#' @param rhs A function call using the magrittr semantics. +#' @return The result of calling `rhs(lhs)`. +NULL + +#' Mark character strings as literal JavaScript code +#' +#' See [htmlwidgets::JS()] for details. +#' +#' @name JS +#' @keywords internal +#' @export +#' @importFrom htmlwidgets JS +#' @usage JS(...) +#' @inheritParams htmlwidgets::JS +#' @return A string that will be interpreted as JavaScript code in htmlwidgets. +NULL + +#' Construct aesthetic mappings +#' +#' See [ggplot2::aes()] for details. +#' +#' @name aes +#' @keywords internal +#' @export +#' @importFrom ggplot2 aes +#' @usage aes(x, y, ...) +#' @inheritParams ggplot2::aes +#' @return A list with class `uneval`. Components of the list are either quosures or constants. +NULL + +#' Quote faceting variables +#' +#' See [ggplot2::vars()] for details. +#' +#' @name vars +#' @keywords internal +#' @export +#' @importFrom ggplot2 vars +#' @usage vars(...) +#' @inheritParams ggplot2::vars +#' @return A list with class `uneval`. Components of the list are either quosures or constants. +NULL + +#' Useful labeller functions +#' +#' See [ggplot2::label_value()] for details. +#' +#' @name label_value +#' @keywords internal +#' @export +#' @importFrom ggplot2 label_value +#' @usage label_value(labels, multi_line = TRUE) +#' @inheritParams ggplot2::label_value +#' @return Labels to be used in a facetted chart. +NULL diff --git a/R/vchart-package.R b/R/vchart-package.R index 16d4bfd..9ce7a7f 100644 --- a/R/vchart-package.R +++ b/R/vchart-package.R @@ -7,42 +7,3 @@ #' @name vchartr-package #' @author Victor Perrier (@@dreamRs_fr) "_PACKAGE" - -#' vchartr exported operators and S3 methods -#' -#' The following functions are imported and then re-exported -#' from the vchartr package to avoid listing the magrittr -#' as Depends of vchartr -#' -#' @name vchartr-exports -NULL - -#' @importFrom magrittr %>% -#' @name %>% -#' @export -#' @rdname vchartr-exports -NULL - -#' @importFrom ggplot2 aes -#' @name aes -#' @export -#' @rdname vchartr-exports -NULL - -#' @importFrom ggplot2 vars -#' @name vars -#' @export -#' @rdname vchartr-exports -NULL - -#' @importFrom ggplot2 label_value -#' @name label_value -#' @export -#' @rdname vchartr-exports -NULL - -#' @importFrom htmlwidgets JS -#' @name JS -#' @export -#' @rdname vchartr-exports -NULL