knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

butterfly

Lifecycle: experimental CRAN status

The goal of butterfly is to produce (side-by-side and other) density plots

Installation

You can install the released version of butterfly from github with:

devtools::install_github("RaymondBalise/butterfly")

Example

This is a basic example which shows you how to draw a butterfly plot.

library(butterfly)

butterfly(malesFemales1910$sex, malesFemales1910$age, "Census 1910")

butterfly(malesFemales2010$sex, malesFemales2010$age, "Census 2010", 
          infoHeight = 15, ageLimit = 110)

If you prefer a common shared axis consider using the butterfly_closed function

butterfly_closed(malesFemales2010$sex, malesFemales2010$age, "Census 2010")
butterfly_closed(malesFemales2010$sex, malesFemales2010$age, "Census 2010", 
                 vertical=FALSE)

Please note that the 'butterfly' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.



RaymondBalise/butterfly documentation built on Dec. 27, 2019, 2:16 a.m.