Nothing
test_that("use of bang-bang operator in tidyeval works when propegated through ggpacket", {
y <- rlang::quo(mpg)
f <- function(...) {
my_aes <- rlang::enquos(...)
ggpacket() %+% geom_line(aes(!!!my_aes))
}
expect_equal({
p <- ggplot(mtcars) + aes(x = wt) + (ggpacket() + geom_line(aes(y = !!y)))
p$layers[[1]]$mapping$y
}, {
p <- ggplot(mtcars) + aes(x = wt) + geom_line(aes(y = mpg))
p$layers[[1]]$mapping$y
})
expect_equal({
p <- ggplot(mtcars) + aes(x = wt) + f(y = mpg, color = am)
p$layers[[1]]$mapping$y
}, {
p <- ggplot(mtcars) + aes(x = wt) + geom_line(aes(y = mpg))
p$layers[[1]]$mapping$y
})
expect_equal({
p <- ggplot(mtcars) + aes(x = wt) + (ggpacket(aes(y = !!y)) + geom_line())
p$layers[[1]]$mapping$y
}, {
p <- ggplot(mtcars) + aes(x = wt) + geom_line(aes(y = mpg))
p$layers[[1]]$mapping$y
})
expect_equal({
p <- ggplot(mtcars) + aes(x = wt) + (ggpacket() + (ggpacket() + geom_line(aes(y = !!y))))
p$layers[[1]]$mapping$y
}, {
p <- ggplot(mtcars) + aes(x = wt) + geom_line(aes(y = mpg))
p$layers[[1]]$mapping$y
})
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.