Description Usage Arguments Value Examples
Make an interactive catepillar plot
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
)
|
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 |
An interactive catepillar plot
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)
|
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.