Displaying Changes Between Two Points Using Dumbbell Plots

Creates dumbbell plots to visualize changes between two measurements for the same observations. The package provides customization options for labels, colors, arrows, delta values, and paired statistical test annotations.


dumbbell R Package: Some More Examples

Step 1

Load libraries

suppressPackageStartupMessages({
library(tidyverse)
library(ggplot2) 
library(rlang)
library(utils)
library(data.table)
library(dumbbell)

     
})

Step 2

Get some data: Example data taken from https://plotly.com/r/dumbbell-plots/

s % mutate("type" = 'Gender earnings disparity') 

Step 3

Plot

dumbbell::dumbbell(xdf=s1,id="School",key = "type", column1 = "Women", column2 = "Men", delt=1 ,arrow = 1, lab1 = "Women", lab2="Men", p_col1 = "red", p_col2 = "blue" ,pt_val = 1 , pval = 2, textsize = 3) + 
xlim(60,170) + 
facet_wrap( . ~ type)

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("dumbbell")

0.2 by Foo Cheung, 3 months ago


https://github.com/foocheung/dumbbell


Report a bug at https://github.com/foocheung/dumbbell/issues


Browse source code at https://github.com/cran/dumbbell


Authors: Foo Cheung [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports dplyr, ggplot2, grid, rlang, tidyr, utils

Suggests knitr, rmarkdown


See at CRAN