area: Deviation Area chart.

Description Usage Arguments Value Examples

View source: R/area.r

Description

area function will draw area chart for deviation analysis.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
area(
  data,
  date,
  value,
  title = NULL,
  subtitle = NULL,
  xtitle = NULL,
  ytitle = NULL,
  caption = NULL
)

Arguments

data

input dataframe

date

date variable

value

value 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
economics$returns_perc <- c(0, diff(economics$psavert)/economics$psavert[-length(economics$psavert)])
economics<- as.data.frame(economics)

#area chart
plot<- area(data=economics[1:100,],date = "date",value = "returns_perc")
plot

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