We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
add_class()
1 parent 8ac14d6 commit fda95e1Copy full SHA for fda95e1
R/aes-variants.R
@@ -113,8 +113,7 @@ aes_all <- function(vars) {
113
# Quosure the symbols in the empty environment because they can only
114
# refer to the data mask
115
x <- class_mapping(lapply(vars, function(x) new_quosure(as.name(x), emptyenv())))
116
- class(x) <- union("unlabelled", class(x))
117
- x
+ add_class(x, "unlabelled")
118
}
119
120
#' Automatic aesthetic mapping
R/theme.R
@@ -501,7 +501,7 @@ theme <- function(...,
501
502
503
t <- class_theme(elements, complete = complete, validate = validate)
504
- class(t) <- union("theme", class(t))
+ t <- add_class(t, "theme")
505
t
506
507
0 commit comments