Skip to content

Commit 66b31c8

Browse files
committed
Add labeller example for optional argument. Fixes #5916
1 parent 09d5c35 commit 66b31c8

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Config/testthat/edition: 3
7878
Encoding: UTF-8
7979
LazyData: true
8080
Roxygen: list(markdown = TRUE)
81-
RoxygenNote: 7.3.1
81+
RoxygenNote: 7.3.2
8282
Collate:
8383
'ggproto.R'
8484
'ggplot-global.R'

R/labeller.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@
8383
#' # Interpreting the labels as plotmath expressions
8484
#' p + facet_grid(. ~ cyl2)
8585
#' p + facet_grid(. ~ cyl2, labeller = label_parsed)
86+
#'
87+
#' # Include optional argument in label function
88+
#' p + facet_grid(. ~ cyl, labeller = function(x) label_both(x, sep = "="))
8689
#' }
8790
#' @name labellers
8891
NULL

man/labellers.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)