knitr::opts_chunk$set( collapse = TRUE, comment = "#<", fig.path = "man/figures/README-", out.width = "100%" )
knitr::include_graphics("bizarro.jpg")
This toy packages transforms inputs into "bizarro outputs".
It was created as an exercise for the Building Tidy Tools workshop at RStudio Conference 2020.
It contains a single generic function bizarro()
, powered by the R's S3 object-oriented system.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("acastroaraujo/bizarro")
This is a basic example which shows you how to solve a common problem:
library(bizarro) bizarro("andrés castro araújo") ## works on lists example <- list(numeric = 1:10, factor = factor(stringr::fruit[1:5]), logical = c(TRUE, FALSE, NA, FALSE, TRUE) ) bizarro(example) ## works on data frames (and nested data frames) bizarro(iris) ## doesn't work on dates bizarro(as.Date("1990-04-03"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.