Skip to content

Commit 814df05

Browse files
committed
revalue was removed
1 parent d1f44f3 commit 814df05

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

R/labels.R

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,13 @@ setup_plot_labels <- function(plot, layers, data) {
8484
))
8585
}
8686

87-
if (length(plot_labels$dictionary) > 0) {
88-
labels <- lapply(labels, revalue, replace = plot_labels$dictionary)
87+
dict <- plot_labels$dictionary
88+
if (length(dict) > 0) {
89+
labels <- lapply(labels, function(x) {
90+
dict <- dict[names(dict) %in% x]
91+
x[match(names(dict), x)] <- dict
92+
x
93+
})
8994
}
9095

9196
defaults(plot_labels, labels)

0 commit comments

Comments
 (0)