Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- az$week <-format(az$proper_date, format = "%W")
- az$month <-format(az$proper_date, format = "%m")
- az$year <-format(az$proper_date, format = "%y")
- by_wk <- az %>% group_by(as.numeric(year), as.numeric(week), party) %>% summarise(sum = sum(contb_receipt_amt),
- avg = mean(contb_receipt_amt))
- ggplot(by_wk[!is.na(by_wk),],
- aes(week, sum, group=2, color=party))+
- geom_line()
Advertisement
Add Comment
Please, Sign In to add comment