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.
1 parent 0e4394d commit 9e67b94Copy full SHA for 9e67b94
R/geom-.R
@@ -172,8 +172,16 @@ Geom <- ggproto("Geom",
172
173
# Override mappings with params
174
aes_params <- intersect(self$aesthetics(), names(params))
175
- check_aesthetics(params[aes_params], nrow(data))
176
- vec_cbind(data[setdiff(names(data), aes_params)], !!!params[aes_params])
+ new_params <- params[aes_params]
+ check_aesthetics(new_params, nrow(data))
177
+ data[aes_params] <- new_params
178
+
179
+ # Restore any AsIs classes (#5656)
180
+ is_asis <- which(vapply(new_params, inherits, what = "AsIs", logical(1)))
181
+ for (i in aes_params[is_asis]) {
182
+ data[[i]] <- I(data[[i]])
183
+ }
184
+ data
185
},
186
187
# Most parameters for the geom are taken automatically from draw_panel() or
0 commit comments