ggCatepillar: Make an interactive catepillar plot

Description Usage Arguments Value Examples

View source: R/ggCatepillar.R

Description

Make an interactive catepillar plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ggCatepillar(
  data,
  mapping,
  errorbar = "se",
  interactive = FALSE,
  digits = 1,
  flip = FALSE,
  use.label = TRUE,
  use.labels = TRUE
)

Arguments

data

a data.frame

mapping

Set of aesthetic mappings created by aes or aes_.

errorbar

which value is displayed with errorbar :"se" or "sd"

interactive

A logical value. If TRUE, an interactive plot will be returned

digits

An integer indicating the number of decimal places

flip

Logical. If TRUE, coord_flip() function is used to make a horizontal plot

use.label

Logical. Whether or not use column label in case of labelled data

use.labels

Logical. Whether or not use value labels in case of labelled data

Value

An interactive catepillar plot

Examples

1
2
3
4
5
6
require(moonBook)
require(ggiraph)
require(ggplot2)
ggCatepillar(acs,aes(Dx,age,color=HBP))
ggCatepillar(acs,aes(c(Dx,sex),age,color=HBP),interactive=TRUE,flip=TRUE,use.labels=FALSE)
ggCatepillar(acs,aes(age,height,color=sex),errorbar=FALSE,interactive=TRUE)

Example output

Loading required package: moonBook

Attaching package: 'moonBook'

The following objects are masked from 'package:ggiraphExtra':

    addLabelDf, getMapping

Loading required package: ggiraph
Loading required package: ggplot2
Warning messages:
1: In qt(conf.interval/2 + 0.5, datac$n - 1) : NaNs produced
2: position_dodge requires non-overlapping x intervals 
3: position_dodge requires non-overlapping x intervals 

ggiraphExtra documentation built on Oct. 23, 2020, 7:39 p.m.