Skip to content

Commit d208903

Browse files
connorlewisclauswilke
authored andcommitted
fixes the dependency of labeller example on plyr in issue #3083 (#3087)
* fixes the dependency of labeller example on plyr in issue #3083 * adding the .Rd documentation component for labeller * split into two assignments
1 parent a5248cd commit d208903

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

R/labeller.r

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,9 @@ as_labeller <- function(x, default = label_value, multi_line = TRUE) {
398398
#'
399399
#' # In the following example, we rename the levels to the long form,
400400
#' # then apply a wrap labeller to the columns to prevent cropped text
401-
#' msleep$conservation2 <- revalue(msleep$conservation, conservation_status)
401+
#' idx <- match(msleep$conservation, names(conservation_status))
402+
#' msleep$conservation2 <- conservation_status[idx]
403+
#'
402404
#' p3 <- ggplot(msleep, aes(x = sleep_total, y = awake)) + geom_point()
403405
#' p3 +
404406
#' facet_grid(vore ~ conservation2,

man/labeller.Rd

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

0 commit comments

Comments
 (0)