Skip to content

Commit af19236

Browse files
committed
Various polishes
1 parent 8d87ed6 commit af19236

File tree

9 files changed

+26
-15
lines changed

9 files changed

+26
-15
lines changed

R/coord-.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#'
2929
#' A constructor function is usually paired with a Coord class. The constructor
3030
#' copies the coord class and populates parameters. The constructor function name
31-
#' is formatted by taking the Coord class name and formatting it with snake_case,
31+
#' should take the Coord class name and be formatted with snake_case,
3232
#' so that `CoordNew` becomes `coord_new()`.
3333
#'
3434
#' @export
@@ -153,7 +153,7 @@ Coord <- ggproto("Coord",
153153
#' **Arguments**
154154
#' \describe{
155155
#' \item{`layout`}{A data frame computed by `Facet$compute_layout()`.
156-
#' Typically contains the facetting variables, `ROW`, `COL`, `PANEL`,
156+
#' Typically contains the faceting variables, `ROW`, `COL`, `PANEL`,
157157
#' `SCALE_X` and `SCALE_Y` variables.}
158158
#' \item{`params`}{A list of parameters coming from the `setup_params()`
159159
#' method.}

R/geom-.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Geom <- ggproto(
125125
#' **Arguments**
126126
#' \describe{
127127
#' \item{`data`}{A data frame with the layer's data.}
128-
#' \item{`params`}{A list of current parameters}
128+
#' \item{`params`}{A list of current parameters.}
129129
#' }
130130
#'
131131
#' **Value**
@@ -149,7 +149,7 @@ Geom <- ggproto(
149149
#' \describe{
150150
#' \item{`data`}{A data frame with the layer's data.}
151151
#' \item{`params`}{A list of parameters coming from the `setup_params()`
152-
#' method}
152+
#' method.}
153153
#' }
154154
#'
155155
#' **Value**
@@ -186,7 +186,7 @@ Geom <- ggproto(
186186
#' \item{`params`}{A list of fixed aesthetic parameters}
187187
#' \item{`modifiers`}{A [mapping][aes()] with delayed evaluations.}
188188
#' \item{`default_aes`}{A [mapping][aes()] with default aesthetics.}
189-
#' \item{`theme`}{A [completed theme][complete_theme()]}
189+
#' \item{`theme`}{A [completed theme][complete_theme()].}
190190
#' }
191191
#'
192192
#' **Value**
@@ -386,7 +386,9 @@ Geom <- ggproto(
386386
#'
387387
#' **Value**
388388
#'
389-
#' A single grob or [`zeroGrob()`] when there is nothing to draw.
389+
#' A single grob or [`zeroGrob()`] when there is nothing to draw. For
390+
#' `draw_panel()` this can be a [gTree][grid::grob] holding individual grobs
391+
#' from the `draw_group()` method.
390392
draw_panel = function(self, data, panel_params, coord, ...) {
391393
groups <- split(data, factor(data$group))
392394
grobs <- lapply(groups, function(group) {

R/guide-.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ Guide <- ggproto(
367367
#' **Arguments**
368368
#' \describe{
369369
#' \item{`params`}{A list of parameters initiated by the `params` field.}
370-
#' \item{`coord`}{A list of current parameters}
370+
#' \item{`coord`}{A `<Coord>` ggproto object.}
371371
#' \item{`...`}{Optional arguments, typically `panel_params` for most
372372
#' position guides.}
373373
#' }

R/layer.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,8 @@ validate_mapping <- function(mapping, call = caller_env()) {
374374
#' ```
375375
#' @usage NULL
376376
#' @format NULL
377+
#' @examples
378+
#' # None: Layer is not intended to be extended
377379
Layer <- ggproto("Layer", NULL,
378380

379381
# Fields ------------------------------------------------------------------

R/stat-.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,9 @@ Stat <- ggproto(
313313
data_new[, !names(data_new) %in% non_constant_columns, drop = FALSE]
314314
},
315315

316-
compute_group = not_implemented("compute_group"),
316+
compute_group = function(self, data, scales) {
317+
cli::cli_abort("Not implemented.")
318+
},
317319

318320
# finish_statistics -------------------------------------------------------
319321

man/Coord.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/Geom.Rd

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/Guide.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/Layer-class.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)