View source: R/ggplot2_template.R
This is a template function to use for ggplot2 outputs. Use this as an extension to a ggplot2 script.
1 |
1 2 3 4 5 | x_var <- factor(sample(x = 1:2, size = 100, replace = T), label = c('False', 'True'))
y_var <- sample(x = 1:100, size = 100, replace = T)
xy = data.frame(x_var, y_var)
ggplot(xy, aes(x = x_var)) + geom_bar() + ggplot2_template() + ggtitle('False vs True')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.