Description Usage Arguments Value Examples
Draw an interactive bidirectional bar plot
1 2 | ggBidirectionalBar(data, left = NULL, right = NULL, label = NULL,
title = "", legendposition = 1, interactive = FALSE)
|
data |
A data.frame |
left |
A character vector of column names be assigned to left-sided bar |
right |
A character vector of column names be assigned to right-sided bar |
label |
A character vector of column names be assigned to the label |
title |
Plot title |
legendposition |
An integer specifying the legend position. One of among c(1,2,3,4). Default value is 1. |
interactive |
A logical value. If TRUE, an interactive plot will be returned |
An interactive interactive bidirectional bar plot
1 2 3 4 5 | require(ggplot2)
KS2016=get_popdata("KS",2016)
ggBidirectionalBar(data=KS2016,left="Male",right="Female",label="Age")
ggBidirectionalBar(data=KS2016,left="Male",right="Female",label="Age",legendposition=2)
ggBidirectionalBar(data=KS2016,left="Male",right="Female",label="Age",interactive=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.