library(cranlogs)
library(ggplot2)
library(lubridate)
library(dplyr)

cran_downloads("shiny", from = "2012-12-02", to = "2018-09-29") %>%
  mutate(week = ceiling_date(date, "week")) %>%
  group_by(week) %>%
  summarise(count = sum(count)) %>%
  ggplot(aes(x = week, y = count)) +
  ylab("weekly downloads") +
  geom_line()