require(stats)
library(groupdata2) # from github
library(dplyr)
sunspots_ <- sunspot.month %>% 
  as.data.frame() %>% 
  group(n = 12,
        method = 'greedy',
        force_equal = TRUE,
        col_name = 'year') %>% 
  mutate(month = 1:n()) %>% 
  ungroup() %>% 
  mutate(year = as.numeric(year),
         year = year + 1748) %>% 
  filter(year < 2017) # We only have up to and containing Obama

devtools::use_data(sunspots_, overwrite = T)

# Modified version of the dataset found at
# http://thedatahub.org/api/data/ba0cdb03-c0f0-45ff-a21f-63fdf6ce1a89/
# License is public domain
# USA.presidents <- USA.presidents %>% 
#   mutate(took_office = lubridate::dmy(took_office))
# 
# devtools::use_data(USA.presidents, overwrite = T)


LudvigOlsen/transfrr documentation built on May 28, 2019, 1:34 p.m.