context('season-year')
test_that('test output of season_year', {
require(lubridate)
x <- dmy("1/12/2015") + months(0:12)
object <- season_year(x)
expected <- c(2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016,
2016, 2016, 2017)
expect_equal(object, expected)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.