Nothing
library(dplyr)
library(tibble)
get_tb <- function() {
mtcars %>%
group_by(cyl) %>%
summarize(wt = mean(wt), mpg = mean(mpg)) %>%
ungroup() %>%
mutate(
wt = sprintf("%.2f", wt),
mpg = sprintf("%.1f", mpg)
)
}
test_that("ttheme_set works as expected but is not baked into objects", {
tb <- get_tb()
df <- tibble(x = 5.45, y = 34, tb = list(tb))
ttheme_set()
p1 <- ggplot(mtcars, aes(wt, mpg, colour = factor(cyl))) +
geom_point() +
geom_table(data = df, aes(x = x, y = y, label = tb))
ttheme_set(ttheme_gtbw)
p2 <- ggplot(mtcars, aes(wt, mpg, colour = factor(cyl))) +
geom_point() +
geom_table(data = df, aes(x = x, y = y, label = tb))
expect_equal(p1, p2)
})
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.