Description Usage Arguments Value Examples
dumbbell function will draw Dumbbell Plot for Ranking analysis.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
data |
input data.frame |
group |
group variable |
dif.var |
difference variable |
value.var |
value variable |
start |
start value |
end |
end value |
title |
input data.frame |
subtitle |
date variable |
xtitle |
value variable |
ytitle |
input data.frame |
caption |
date variable |
An object of class ggplot
1 2 3 4 5 6 7 8 | # prep data
gapminder <- gapminder %>% group_by(continent,year) %>%
summarise(meangdppercap=mean(gdpPercap)) %>% as.data.frame(.)
gapminder[59,"meangdppercap"]<-20088.78
#dumbbell plot
plot<- dumbbell(data=gapminder,group="continent",dif.var="year",value.var="meangdppercap",start=1997,end=2002)
plot
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.