ggBidirectionalBar: Draw an interactive bidirectional bar plot

Description Usage Arguments Value Examples

Description

Draw an interactive bidirectional bar plot

Usage

1
2
ggBidirectionalBar(data, left = NULL, right = NULL, label = NULL,
  title = "", legendposition = 1, interactive = FALSE)

Arguments

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

Value

An interactive interactive bidirectional bar plot

Examples

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)

cardiomoon/moonBook2 documentation built on May 13, 2019, 12:40 p.m.