Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- month Yi Yi+1
- 1 0.014310185 13.43838262
- 2 0.014310185 15.7792948
- 3 0.176113783 16.14479846
- 4 3.143663699 16.54060078
- 5 3.755478277 16.75810501
- 6 3.767263653 17.03156884
- 7 3.767263653 17.03156884
- 8 3.829219647 17.03156884
- 9 4.375269901 17.78482322
- 10 8.707536696 18.47995179
- 11 10.28741362 21.33942187
- 12 10.66218286 21.82637774
- df <- read_excel("df.xls", col_names = FALSE, skip = 1)
- colnames(df) <- c("month", "Yi","Yi+1", "Yi+2", "Yi+3", "Yi+4", "Yi+5","Yi+6", "Yi+7", "Yi+8", "Yi+9", "Yi+10","Yi+11","Yi+12","Yi+13","Yi+14")
- df.melt <- melt(tab.df, id = c("month","Yi","Yi+1","Yi+2", "Yi+3", "Yi+4", "Yi+5","Yi+6", "Yi+7", "Yi+8", "Yi+9", "Yi+10","Yi+11","Yi+12","Yi+13", "Yi+14"))
- bar <- group_by(df.melt, vars = c(1:12), drop = "month")
- ggplot(bar, aes(x=variable, y=mean, fill=factor(month)))+
- geom_bar(position="dodge", stat="identity")
Add Comment
Please, Sign In to add comment