Skip to content

Commit

Permalink
Add labeller example for optional argument. Fixes #5916
Browse files Browse the repository at this point in the history
  • Loading branch information
sierrajohnson committed Aug 15, 2024
1 parent 09d5c35 commit 66b31c8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Collate:
'ggproto.R'
'ggplot-global.R'
Expand Down
3 changes: 3 additions & 0 deletions R/labeller.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@
#' # Interpreting the labels as plotmath expressions
#' p + facet_grid(. ~ cyl2)
#' p + facet_grid(. ~ cyl2, labeller = label_parsed)
#'
#' # Include optional argument in label function
#' p + facet_grid(. ~ cyl, labeller = function(x) label_both(x, sep = "="))
#' }
#' @name labellers
NULL
Expand Down
3 changes: 3 additions & 0 deletions man/labellers.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 66b31c8

Please sign in to comment.