orderbar: Ranking Ordered Bar Chart.

Description Usage Arguments Value Examples

View source: R/orderbar.R

Description

orderbar function will draw Ordered Bar Chart for Ranking analysis.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
orderbar(
  data,
  x,
  y,
  title = NULL,
  subtitle = NULL,
  xtitle = NULL,
  ytitle = NULL,
  caption = NULL
)

Arguments

data

input dataframe

x

x variable

y

y variable

title

input data.frame

subtitle

date variable

xtitle

value variable

ytitle

input data.frame

caption

date variable

Value

An object of class ggplot

Examples

1
2
3
4
5
6
7
Prepare data: group mean city mileage by manufacturer.
cty_mpg <- aggregate(mpg$cty, by=list(mpg$manufacturer), FUN=mean)  # aggregate
colnames(cty_mpg) <- c("make", "mileage")                           # change column names

#orderbar
plot<- orderbar(data=cty_mpg,x="make",y="mileage")
plot

HeeseokMoon/ggedachart documentation built on Dec. 31, 2020, 12:59 p.m.