From 27d49a35df1685200afcc09679a37a438a6d84a3 Mon Sep 17 00:00:00 2001 From: Daniel Sabanes Bove Date: Mon, 22 Jun 2026 08:40:24 +0800 Subject: [PATCH 1/2] doc fixes --- .gitignore | 1 + DESCRIPTION | 2 +- NEWS.md | 6 +++++- R/table_themes.R | 26 +++++++++----------------- man/geom_km.Rd | 10 ++++++---- man/geom_km_ticks.Rd | 8 +++++--- man/ggplot2.utils-package.Rd | 1 + man/ggproto.Rd | 11 ----------- man/stat_km.Rd | 6 ++++-- man/stat_km_ticks.Rd | 6 ++++-- 10 files changed, 36 insertions(+), 41 deletions(-) diff --git a/.gitignore b/.gitignore index f714b78..ddf8624 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ tests/testthat/Rplots.pdf tests/testthat/testthat-problems.rds tests/testthat/_snaps/**/*.new.md tests/testthat/_snaps/**/*.new.svg +.DS_Store diff --git a/DESCRIPTION b/DESCRIPTION index c76170b..969abe5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -44,7 +44,6 @@ Encoding: UTF-8 Language: en-US LazyData: false Roxygen: list(markdown = TRUE) -RoxygenNote: 7.3.2 Collate: 'geom_km.R' 'geom_km_ticks.R' @@ -58,3 +57,4 @@ Collate: 'stat_prop.R' 'table_themes.R' 'ttheme_set.R' +Config/roxygen2/version: 8.0.0 diff --git a/NEWS.md b/NEWS.md index 9ad800b..0f80c80 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,8 @@ -# ggplot2.utils 0.3.3.9000 +# ggplot2.utils 0.3.4.9000 + +* Fixes for documentation. + +# ggplot2.utils 0.3.3 * Generalized one test to comply with the new `ggplot2` version. diff --git a/R/table_themes.R b/R/table_themes.R index 368a5a3..4547155 100644 --- a/R/table_themes.R +++ b/R/table_themes.R @@ -8,24 +8,16 @@ #' #' @name ttheme_gtdefault #' @rdname ttheme_gtdefault -#' @aliases -#' ttheme_gtbw -#' ttheme_gtdark -#' ttheme_gtlight -#' ttheme_gtminimal -#' ttheme_gtplain -#' ttheme_gtsimple -#' ttheme_gtstripes +#' @aliases ttheme_gtbw +#' @aliases ttheme_gtdark +#' @aliases ttheme_gtlight +#' @aliases ttheme_gtminimal +#' @aliases ttheme_gtplain +#' @aliases ttheme_gtsimple +#' @aliases ttheme_gtstripes #' -#' @importFrom ggpp -#' ttheme_gtbw -#' ttheme_gtdark -#' ttheme_gtdefault -#' ttheme_gtlight -#' ttheme_gtminimal -#' ttheme_gtplain -#' ttheme_gtsimple -#' ttheme_gtstripes +#' @importFrom ggpp ttheme_gtbw ttheme_gtdark ttheme_gtdefault ttheme_gtlight ttheme_gtminimal +#' @importFrom ggpp ttheme_gtplain ttheme_gtsimple ttheme_gtstripes #' #' @export ttheme_gtbw ttheme_gtdark ttheme_gtdefault ttheme_gtlight #' @export ttheme_gtminimal ttheme_gtplain ttheme_gtsimple ttheme_gtstripes diff --git a/man/geom_km.Rd b/man/geom_km.Rd index 082090a..edc7b80 100644 --- a/man/geom_km.Rd +++ b/man/geom_km.Rd @@ -38,7 +38,7 @@ from a \code{formula} (e.g. \code{~ head(.x, 10)}).} \item{stat}{The statistical transformation to use on the data for this layer. When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used the override the default coupling between geoms and +argument can be used to override the default coupling between geoms and stats. The \code{stat} argument accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. @@ -66,12 +66,14 @@ to use \code{position_jitter()}, give the position as \code{"jitter"}. \code{NA}, the default, includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} always includes. It can also be a named logical vector to finely select the aesthetics to -display.} +display. To include legend keys for all levels, even +when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, +but unobserved levels are omitted.} \item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[ggplot2:borders]{borders()}}.} +the default plot specification, e.g. \code{\link[ggplot2:annotation_borders]{annotation_borders()}}.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} @@ -137,6 +139,6 @@ The default \code{stat} for this \code{geom} is \code{\link[=stat_km]{stat_km()} } \author{ Inspired by \code{geom_km} written by Michael Sachs (in \code{ggkm}) and -Samer Mouksassi (in \code{ggquickeda}). Here we directly use \code{\link[ggplot2:geom_path]{ggplot2::geom_step()}} +Samer Mouksassi (in \code{ggquickeda}). Here we directly use \code{\link[ggplot2:geom_step]{ggplot2::geom_step()}} instead of the more general \code{\link[ggplot2:geom_path]{ggplot2::geom_path()}}. } diff --git a/man/geom_km_ticks.Rd b/man/geom_km_ticks.Rd index b6fde9f..2ef6b6a 100644 --- a/man/geom_km_ticks.Rd +++ b/man/geom_km_ticks.Rd @@ -38,7 +38,7 @@ from a \code{formula} (e.g. \code{~ head(.x, 10)}).} \item{stat}{The statistical transformation to use on the data for this layer. When using a \verb{geom_*()} function to construct a layer, the \code{stat} -argument can be used the override the default coupling between geoms and +argument can be used to override the default coupling between geoms and stats. The \code{stat} argument accepts the following: \itemize{ \item A \code{Stat} ggproto subclass, for example \code{StatCount}. @@ -66,12 +66,14 @@ to use \code{position_jitter()}, give the position as \code{"jitter"}. \code{NA}, the default, includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} always includes. It can also be a named logical vector to finely select the aesthetics to -display.} +display. To include legend keys for all levels, even +when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, +but unobserved levels are omitted.} \item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[ggplot2:borders]{borders()}}.} +the default plot specification, e.g. \code{\link[ggplot2:annotation_borders]{annotation_borders()}}.} \item{na.rm}{If \code{FALSE}, the default, missing values are removed with a warning. If \code{TRUE}, missing values are silently removed.} diff --git a/man/ggplot2.utils-package.Rd b/man/ggplot2.utils-package.Rd index a693e17..ea75195 100644 --- a/man/ggplot2.utils-package.Rd +++ b/man/ggplot2.utils-package.Rd @@ -30,6 +30,7 @@ Useful links: Authors: \itemize{ + \item Daniel Sabanés Bové \email{daniel.sabanes_bove@rconis.com} \item Samer Mouksassi (wrote original Kaplan-Meier code) \item Michael Sachs (wrote original Kaplan-Meier code) } diff --git a/man/ggproto.Rd b/man/ggproto.Rd index 093b967..d1f2568 100644 --- a/man/ggproto.Rd +++ b/man/ggproto.Rd @@ -1,7 +1,6 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/geom_km.R, R/geom_km_ticks.R, R/ggproto.R, % R/stat_km.R, R/stat_km_ticks.R -\docType{data} \name{GeomKm} \alias{GeomKm} \alias{GeomKmTicks} @@ -9,15 +8,6 @@ \alias{StatKm} \alias{StatKmTicks} \title{New \code{ggproto} Objects} -\format{ -An object of class \code{GeomKm} (inherits from \code{GeomStep}, \code{GeomPath}, \code{Geom}, \code{ggproto}, \code{gg}) of length 4. - -An object of class \code{GeomKmTicks} (inherits from \code{Geom}, \code{ggproto}, \code{gg}) of length 6. - -An object of class \code{StatKm} (inherits from \code{Stat}, \code{ggproto}, \code{gg}) of length 5. - -An object of class \code{StatKmTicks} (inherits from \code{Stat}, \code{ggproto}, \code{gg}) of length 5. -} \usage{ GeomKm @@ -39,5 +29,4 @@ Additional \code{\link[ggplot2:ggproto]{ggplot2::ggproto}} objects used by the c originally written by Michael Sachs (in \code{ggkm}) and Samer Mouksassi (in \code{ggquickeda}). } -\keyword{datasets} \keyword{internal} diff --git a/man/stat_km.Rd b/man/stat_km.Rd index fb691b6..d5ab68a 100644 --- a/man/stat_km.Rd +++ b/man/stat_km.Rd @@ -65,12 +65,14 @@ to use \code{position_jitter()}, give the position as \code{"jitter"}. \code{NA}, the default, includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} always includes. It can also be a named logical vector to finely select the aesthetics to -display.} +display. To include legend keys for all levels, even +when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, +but unobserved levels are omitted.} \item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[ggplot2:borders]{borders()}}.} +the default plot specification, e.g. \code{\link[ggplot2:annotation_borders]{annotation_borders()}}.} \item{...}{Other arguments passed on to \code{\link[ggplot2:layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further diff --git a/man/stat_km_ticks.Rd b/man/stat_km_ticks.Rd index c54a977..f728bea 100644 --- a/man/stat_km_ticks.Rd +++ b/man/stat_km_ticks.Rd @@ -65,12 +65,14 @@ to use \code{position_jitter()}, give the position as \code{"jitter"}. \code{NA}, the default, includes if any aesthetics are mapped. \code{FALSE} never includes, and \code{TRUE} always includes. It can also be a named logical vector to finely select the aesthetics to -display.} +display. To include legend keys for all levels, even +when no data exists, use \code{TRUE}. If \code{NA}, all levels are shown in legend, +but unobserved levels are omitted.} \item{inherit.aes}{If \code{FALSE}, overrides the default aesthetics, rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from -the default plot specification, e.g. \code{\link[ggplot2:borders]{borders()}}.} +the default plot specification, e.g. \code{\link[ggplot2:annotation_borders]{annotation_borders()}}.} \item{...}{Other arguments passed on to \code{\link[ggplot2:layer]{layer()}}'s \code{params} argument. These arguments broadly fall into one of 4 categories below. Notably, further From 057cfb21c3221b5ffd21defe3723e0595ebe0489 Mon Sep 17 00:00:00 2001 From: Daniel Sabanes Bove Date: Mon, 22 Jun 2026 08:43:56 +0800 Subject: [PATCH 2/2] fix linter --- .lintr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.lintr b/.lintr index 254b14a..ca11684 100644 --- a/.lintr +++ b/.lintr @@ -2,5 +2,5 @@ linters: linters_with_defaults( line_length_linter(120), object_name_linter = NULL, object_usage_linter = NULL, - cyclocomp_linter = NULL + pipe_consistency_linter = NULL )