knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "80%", cache = TRUE )
The goal of cookiemonster is to add a festive picture of Cookie Monster above a line-up protocol plot, in reference to Graphical inference by Hadley Wickham.
This small package would not have been here without Thomas Lin Pedersen's patchwork.
This package depends on the development package patchwork
which is not yet on CRAN. But can be downloaded from github.
# install.packages("devtools") devtools::install_github("thomasp85/patchwork")
You can install cookiemonster from github with:
# install.packages("devtools") devtools::install_github("EmilHvitfeldt/cookiemonster")
Due to the flexibility of patchwork
we are able to use a quite relaxed notation.
library(ggplot2) library(nullabor) library(patchwork) library(cookiemonster) cookiemonster(data = mtcars, var = "mpg") + aes(mpg, wt) + geom_point() cookiemonster(mtcars, aes(mpg, wt), "mpg") + geom_point()
library(ggplot2) library(nullabor) library(patchwork) library(cookiemonster) cookiemonster(mtcars, var = "mpg") + aes(mpg, wt) + geom_point()
And we can check whether our guess is correct or not
decrypt("WOXC 1IZI Tx t4nTZT4x p")
cookiemonster(mtcars, var = "cyl", procent = 0.2, n = 15, nrow = 3) + geom_boxplot(aes(cyl, mpg, group = cyl))
cookiemonster(mtcars, aes(mpg, wt), "mpg") + geom_point() + theme_bw() + stat_smooth()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.