Closed doug-friedman closed 7 years ago
tests/testthat/test_fill_functions.R:52:27: style: Only use double-quotes.
x <- coffee %>% thicken('day') %>% group_by(time_stamp_day) %>%
^~~~~
tests/testthat/test_pad_int.R:14:30: style: Only use double-quotes.
df$year <- ymd(paste(df$y, '0101', sep = ''))
^~~~~~
tests/testthat/test_pad_int.R:14:44: style: Only use double-quotes.
df$year <- ymd(paste(df$y, '0101', sep = ''))
^~
tests/testthat/test_pad_int.R:15:28: style: Only use double-quotes.
expect_error(pad_int(df, 'g'))
^~~
tests/testthat/test_pad_int.R:16:29: style: Only use double-quotes.
expect_error(pad_int(df, 'year'))
^~~~~~
tests/testthat/test_pad_int.R:17:31: style: Only use double-quotes.
expect_error(pad_int(df$y, 'year'))
^~~~~~
tests/testthat/test_pad_int.R:21:35: style: Only use double-quotes.
df_single <- df %>% filter(g == 'A')
^~~
tests/testthat/test_pad_int.R:22:36: style: Only use double-quotes.
expect_equal( pad_int(df_single, 'y') %>% nrow, 7)
^~~
tests/testthat/test_pad_int.R:23:36: style: Only use double-quotes.
expect_equal( pad_int(df_single, 'y', start_val = 2004) %>% nrow, 9)
^~~
tests/testthat/test_pad_int.R:24:36: style: Only use double-quotes.
expect_equal( pad_int(df_single, 'y', start_val = 2007) %>% nrow, 6)
^~~
tests/testthat/test_pad_int.R:25:36: style: Only use double-quotes.
expect_equal( pad_int(df_single, 'y', end_val = 2014) %>% nrow, 9)
^~~
tests/testthat/test_pad_int.R:26:36: style: Only use double-quotes.
expect_equal( pad_int(df_single, 'y', end_val = 2011) %>% nrow, 6)
^~~
tests/testthat/test_pad_int.R:27:36: style: Only use double-quotes.
expect_equal( pad_int(df_single, 'y', step = 2) %>% nrow, 4)
^~~
tests/testthat/test_pad_int.R:28:36: style: Only use double-quotes.
expect_error( pad_int(df_single, 'y', step = 3))
^~~
tests/testthat/test_pad_int.R:32:29: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g') %>% nrow, 12)
^~~
tests/testthat/test_pad_int.R:32:42: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g') %>% nrow, 12)
^~~
tests/testthat/test_pad_int.R:33:29: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', start_val = 2004) %>% nrow, 17)
^~~
tests/testthat/test_pad_int.R:33:42: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', start_val = 2004) %>% nrow, 17)
^~~
tests/testthat/test_pad_int.R:34:29: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', start_val = 2007) %>% nrow, 11)
^~~
tests/testthat/test_pad_int.R:34:42: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', start_val = 2007) %>% nrow, 11)
^~~
tests/testthat/test_pad_int.R:35:29: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', end_val = 2014) %>% nrow, 17)
^~~
tests/testthat/test_pad_int.R:35:42: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', end_val = 2014) %>% nrow, 17)
^~~
tests/testthat/test_pad_int.R:36:29: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', end_val = 2011) %>% nrow, 11)
^~~
tests/testthat/test_pad_int.R:36:42: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', end_val = 2011) %>% nrow, 11)
^~~
tests/testthat/test_pad_int.R:37:30: style: Only use double-quotes.
expect_equal( pad_int(df2, 'y', group = 'g', step = 2) %>% nrow, 6)
^~~
tests/testthat/test_pad_int.R:37:43: style: Only use double-quotes.
expect_equal( pad_int(df2, 'y', group = 'g', step = 2) %>% nrow, 6)
^~~
tests/testthat/test_pad_int.R:38:30: style: Only use double-quotes.
expect_error( pad_int(df2, 'y', group = 'g', step = 3) )
^~~
tests/testthat/test_pad_int.R:38:43: style: Only use double-quotes.
expect_error( pad_int(df2, 'y', group = 'g', step = 3) )
^~~
tests/testthat/test_pad.R:43:11: style: Only use double-quotes.
test_that('gives warning and same result when start_val and end_val are NULL', {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:56:1: style: lines should not be more than 80 characters.
expect_error( nrow(pad(large_df_grp, interval = "hour", break_above = 0.07, group = "grp")))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:57:1: style: lines should not be more than 80 characters.
expect_equal( nrow(pad(large_df, interval = "hour", break_above = 0.0351)), 35064)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:63:1: style: lines should not be more than 80 characters.
test_that('gives correct output when end_val and/or start_val are specified, date', {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:63:11: style: Only use double-quotes.
test_that('gives correct output when end_val and/or start_val are specified, date', {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:69:40: style: Only use double-quotes.
seq(ymd(20160101), by = 'day', length.out = 4))
^~~~~
tests/testthat/test_pad.R:72:1: style: lines should not be more than 80 characters.
test_that("pad gives informative error when start_val or end_val is of wrong class", {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:80:1: style: lines should not be more than 80 characters.
test_that('gives correct output when end_val and/or start_val are specified, posix', {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:80:11: style: Only use double-quotes.
test_that('gives correct output when end_val and/or start_val are specified, posix', {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:81:30: style: Only use double-quotes.
x <- data.frame(tm = ymd_h('20160102 16'))
^~~~~~~~~~~~~
tests/testthat/test_pad.R:82:18: style: Only use double-quotes.
s_val <- ymd_h('20160101 16')
^~~~~~~~~~~~~
tests/testthat/test_pad.R:83:18: style: Only use double-quotes.
e_val <- ymd_h('20160104 16')
^~~~~~~~~~~~~
tests/testthat/test_pad.R:84:30: style: Only use double-quotes.
compare <- seq(s_val, by = 'day', length.out = 4)
^~~~~
tests/testthat/test_pad.R:109:52: style: Only use double-quotes.
mnths <- seq(ymd(20160101), length.out = 6, by = 'month')
^~~~~~~
tests/testthat/test_pad.R:118:52: style: Only use double-quotes.
mnths <- seq(ymd(20160101), length.out = 6, by = 'month')
^~~~~~~
tests/testthat/test_pad.R:119:1: style: lines should not be more than 80 characters.
x <- data.frame(m = rep( mnths[c(2, 4, 5)], 2), g = letters[c(1, 1, 1, 2, 2, 2)])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:120:32: style: Only use double-quotes.
expect_equal( pad(x, group = 'g', interval = "month")$m, rep(mnths[2:5], 2) )
^~~
tests/testthat/test_pad.R:121:1: style: lines should not be more than 80 characters.
expect_equal( sw(pad(x, group = 'g', start_val = mnths[1]))$m, rep(mnths[1:5], 2) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:121:35: style: Only use double-quotes.
expect_equal( sw(pad(x, group = 'g', start_val = mnths[1]))$m, rep(mnths[1:5], 2) )
^~~
tests/testthat/test_pad.R:122:1: style: lines should not be more than 80 characters.
expect_equal( sw(pad(x, group = 'g', end_val = mnths[6]))$m, rep(mnths[2:6], 2) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:122:35: style: Only use double-quotes.
expect_equal( sw(pad(x, group = 'g', end_val = mnths[6]))$m, rep(mnths[2:6], 2) )
^~~
tests/testthat/test_pad.R:126:52: style: Only use double-quotes.
mnths <- seq(ymd(20160101), length.out = 6, by = 'month')
^~~~~~~
tests/testthat/test_pad.R:130:1: style: lines should not be more than 80 characters.
expect_equal( pad(x, group = c('g1', 'g2'), interval = "months")$m, rep(mnths[2:5], 4) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:130:34: style: Only use double-quotes.
expect_equal( pad(x, group = c('g1', 'g2'), interval = "months")$m, rep(mnths[2:5], 4) )
^~~~
tests/testthat/test_pad.R:130:40: style: Only use double-quotes.
expect_equal( pad(x, group = c('g1', 'g2'), interval = "months")$m, rep(mnths[2:5], 4) )
^~~~
tests/testthat/test_pad.R:131:37: style: Only use double-quotes.
expect_equal( sw(pad(x, group = c('g1', 'g2'), start_val = mnths[1]))$m,
^~~~
tests/testthat/test_pad.R:131:43: style: Only use double-quotes.
expect_equal( sw(pad(x, group = c('g1', 'g2'), start_val = mnths[1]))$m,
^~~~
tests/testthat/test_pad.R:133:37: style: Only use double-quotes.
expect_equal( sw(pad(x, group = c('g1', 'g2'), end_val = mnths[6]))$m,
^~~~
tests/testthat/test_pad.R:133:43: style: Only use double-quotes.
expect_equal( sw(pad(x, group = c('g1', 'g2'), end_val = mnths[6]))$m,
^~~~
tests/testthat/test_pad.R:138:52: style: Only use double-quotes.
mnths <- seq(ymd(20160101), length.out = 6, by = 'month')
^~~~~~~
tests/testthat/test_pad.R:160:57: style: Only use double-quotes.
check_val <- seq( ymd(20150101), length.out = 4, by = 'year')
^~~~~~
tests/testthat/test_pad.R:162:1: style: lines should not be more than 80 characters.
expect_equal( pad(one_var, by = "x_year", interval = "year")$x_year, check_val)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:163:1: style: lines should not be more than 80 characters.
expect_equal( pad(one_var_grps, by = "x_year", group = 'grp', interval = "year")$x_year,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:163:58: style: Only use double-quotes.
expect_equal( pad(one_var_grps, by = "x_year", group = 'grp', interval = "year")$x_year,
^~~~~
tests/testthat/test_pad.R:166:66: style: Only use double-quotes.
expect_equal( pad(two_var_grps, "year", by = "x_year", group = 'grp')$x_year,
^~~~~
tests/testthat/test_pad.R:198:1: style: lines should not be more than 80 characters.
expect_equal(pad(data.frame(x_year, 1), "year", end_val = as.Date("2021-01-01")) %>%
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:200:1: style: lines should not be more than 80 characters.
expect_equal(pad(data.frame(x_year, 1), "year", start_val = as.Date("2012-01-01")) %>%
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_helpers.R:9:23: style: Only use double-quotes.
attr(b_ct_tz_is_NULL, 'tzone') <- NULL
^~~~~~~
tests/testthat/test_thicken_integration.R:34:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_year_2_dts, "year", rounding = "up", by = "ts2")$ts2_year,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:40:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_year_2_dts, "year", by = "ts2", start_val = s)$ts2_year,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:43:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_year_2_dts, "y", by = "ts2", start_val = s)$ts2_year,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:49:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_year, "year", rounding = "up", start_val = s)$time_stamp_year,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:94:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_month_2_dts, "month", rounding = "up", by = "ts2")$ts2_month,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:97:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_month_2_dts, "month", colname = "t", by = "ts2")$t,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:100:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_month_2_dts, "month", by = "ts2", start_val = s)$ts2_month,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:109:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_month, "month", rounding = "up", start_val = s)$time_stamp_month,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:152:1: style: lines should not be more than 80 characters.
expect_equal(suppressWarnings(thicken(coffee_day, "day", start_val = s))$time_stamp_day,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:158:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_day_2_dts, "day", rounding = "up", by = "ts2")$ts2_day,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:227:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_hour_2_dts, "hour", rounding = "up", by = "ts2")$ts2_hour,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:233:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_hour_2_dts, "hour", by = "ts2", start_val = s)$ts2_hour,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:237:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_hour_2_dts, "h", by = "ts2", start_val = s)$ts2_hour,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:243:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_hour, "hour", rounding = "up", start_val = s)$time_stamp_hour,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken.R:49:1: style: lines should not be more than 80 characters.
expect_error(suppressWarnings(thicken(df_with_one_date, interval = "quarter")), NA)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken.R:71:1: style: lines should not be more than 80 characters.
expect_equal(thicken(x, start_val = as.Date("2016-01-02"), interval = "year") %>%
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken.R:81:1: style: lines should not be more than 80 characters.
expect_equal(sw(thicken(x_df, interval = "month"))$x_sec_month %>% get_interval,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken.R:93:1: style: lines should not be more than 80 characters.
day_to_year <- thicken(day_sorted %>% as.data.frame, colname = "x", interval = "year")$x
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken.R:118:1: style: lines should not be more than 80 characters.
expect_equal(colnames(thicken(a_df, interval = "2 days", colname = "jos"))[3], "jos")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken.R:125:1: style: lines should not be more than 80 characters.
expect_equal(sw(dplyr::as_data_frame(df_with_one_date) %>% thicken("2 mon") %>% class),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken.R:127:1: style: lines should not be more than 80 characters.
expect_equal(sw(data.table::as.data.table(df_with_one_date) %>% thicken("2 mon") %>%
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Not a problem. I'll make the change shortly.
tests/testthat/test_fill_functions.R:52:27: style: Only use double-quotes.
x <- coffee %>% thicken('day') %>% group_by(time_stamp_day) %>%
^~~~~
tests/testthat/test_pad_int.R:14:30: style: Only use double-quotes.
df$year <- ymd(paste(df$y, '0101', sep = ''))
^~~~~~
tests/testthat/test_pad_int.R:14:44: style: Only use double-quotes.
df$year <- ymd(paste(df$y, '0101', sep = ''))
^~
tests/testthat/test_pad_int.R:15:28: style: Only use double-quotes.
expect_error(pad_int(df, 'g'))
^~~
tests/testthat/test_pad_int.R:16:29: style: Only use double-quotes.
expect_error(pad_int(df, 'year'))
^~~~~~
tests/testthat/test_pad_int.R:17:31: style: Only use double-quotes.
expect_error(pad_int(df$y, 'year'))
^~~~~~
tests/testthat/test_pad_int.R:21:35: style: Only use double-quotes.
df_single <- df %>% filter(g == 'A')
^~~
tests/testthat/test_pad_int.R:22:36: style: Only use double-quotes.
expect_equal( pad_int(df_single, 'y') %>% nrow, 7)
^~~
tests/testthat/test_pad_int.R:23:36: style: Only use double-quotes.
expect_equal( pad_int(df_single, 'y', start_val = 2004) %>% nrow, 9)
^~~
tests/testthat/test_pad_int.R:24:36: style: Only use double-quotes.
expect_equal( pad_int(df_single, 'y', start_val = 2007) %>% nrow, 6)
^~~
tests/testthat/test_pad_int.R:25:36: style: Only use double-quotes.
expect_equal( pad_int(df_single, 'y', end_val = 2014) %>% nrow, 9)
^~~
tests/testthat/test_pad_int.R:26:36: style: Only use double-quotes.
expect_equal( pad_int(df_single, 'y', end_val = 2011) %>% nrow, 6)
^~~
tests/testthat/test_pad_int.R:27:36: style: Only use double-quotes.
expect_equal( pad_int(df_single, 'y', step = 2) %>% nrow, 4)
^~~
tests/testthat/test_pad_int.R:28:36: style: Only use double-quotes.
expect_error( pad_int(df_single, 'y', step = 3))
^~~
tests/testthat/test_pad_int.R:32:29: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g') %>% nrow, 12)
^~~
tests/testthat/test_pad_int.R:32:42: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g') %>% nrow, 12)
^~~
tests/testthat/test_pad_int.R:33:29: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', start_val = 2004) %>% nrow, 17)
^~~
tests/testthat/test_pad_int.R:33:42: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', start_val = 2004) %>% nrow, 17)
^~~
tests/testthat/test_pad_int.R:34:29: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', start_val = 2007) %>% nrow, 11)
^~~
tests/testthat/test_pad_int.R:34:42: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', start_val = 2007) %>% nrow, 11)
^~~
tests/testthat/test_pad_int.R:35:29: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', end_val = 2014) %>% nrow, 17)
^~~
tests/testthat/test_pad_int.R:35:42: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', end_val = 2014) %>% nrow, 17)
^~~
tests/testthat/test_pad_int.R:36:29: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', end_val = 2011) %>% nrow, 11)
^~~
tests/testthat/test_pad_int.R:36:42: style: Only use double-quotes.
expect_equal( pad_int(df, 'y', group = 'g', end_val = 2011) %>% nrow, 11)
^~~
tests/testthat/test_pad_int.R:37:30: style: Only use double-quotes.
expect_equal( pad_int(df2, 'y', group = 'g', step = 2) %>% nrow, 6)
^~~
tests/testthat/test_pad_int.R:37:43: style: Only use double-quotes.
expect_equal( pad_int(df2, 'y', group = 'g', step = 2) %>% nrow, 6)
^~~
tests/testthat/test_pad_int.R:38:30: style: Only use double-quotes.
expect_error( pad_int(df2, 'y', group = 'g', step = 3) )
^~~
tests/testthat/test_pad_int.R:38:43: style: Only use double-quotes.
expect_error( pad_int(df2, 'y', group = 'g', step = 3) )
^~~
tests/testthat/test_pad.R:43:11: style: Only use double-quotes.
test_that('gives warning and same result when start_val and end_val are NULL', {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:56:1: style: lines should not be more than 80 characters.
expect_error( nrow(pad(large_df_grp, interval = "hour", break_above = 0.07, group = "grp")))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:57:1: style: lines should not be more than 80 characters.
expect_equal( nrow(pad(large_df, interval = "hour", break_above = 0.0351)), 35064)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:63:1: style: lines should not be more than 80 characters.
test_that('gives correct output when end_val and/or start_val are specified, date', {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:63:11: style: Only use double-quotes.
test_that('gives correct output when end_val and/or start_val are specified, date', {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:69:40: style: Only use double-quotes.
seq(ymd(20160101), by = 'day', length.out = 4))
^~~~~
tests/testthat/test_pad.R:72:1: style: lines should not be more than 80 characters.
test_that("pad gives informative error when start_val or end_val is of wrong class", {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:80:1: style: lines should not be more than 80 characters.
test_that('gives correct output when end_val and/or start_val are specified, posix', {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:80:11: style: Only use double-quotes.
test_that('gives correct output when end_val and/or start_val are specified, posix', {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:81:30: style: Only use double-quotes.
x <- data.frame(tm = ymd_h('20160102 16'))
^~~~~~~~~~~~~
tests/testthat/test_pad.R:82:18: style: Only use double-quotes.
s_val <- ymd_h('20160101 16')
^~~~~~~~~~~~~
tests/testthat/test_pad.R:83:18: style: Only use double-quotes.
e_val <- ymd_h('20160104 16')
^~~~~~~~~~~~~
tests/testthat/test_pad.R:84:30: style: Only use double-quotes.
compare <- seq(s_val, by = 'day', length.out = 4)
^~~~~
tests/testthat/test_pad.R:109:52: style: Only use double-quotes.
mnths <- seq(ymd(20160101), length.out = 6, by = 'month')
^~~~~~~
tests/testthat/test_pad.R:118:52: style: Only use double-quotes.
mnths <- seq(ymd(20160101), length.out = 6, by = 'month')
^~~~~~~
tests/testthat/test_pad.R:119:1: style: lines should not be more than 80 characters.
x <- data.frame(m = rep( mnths[c(2, 4, 5)], 2), g = letters[c(1, 1, 1, 2, 2, 2)])
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:120:32: style: Only use double-quotes.
expect_equal( pad(x, group = 'g', interval = "month")$m, rep(mnths[2:5], 2) )
^~~
tests/testthat/test_pad.R:121:1: style: lines should not be more than 80 characters.
expect_equal( sw(pad(x, group = 'g', start_val = mnths[1]))$m, rep(mnths[1:5], 2) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:121:35: style: Only use double-quotes.
expect_equal( sw(pad(x, group = 'g', start_val = mnths[1]))$m, rep(mnths[1:5], 2) )
^~~
tests/testthat/test_pad.R:122:1: style: lines should not be more than 80 characters.
expect_equal( sw(pad(x, group = 'g', end_val = mnths[6]))$m, rep(mnths[2:6], 2) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:122:35: style: Only use double-quotes.
expect_equal( sw(pad(x, group = 'g', end_val = mnths[6]))$m, rep(mnths[2:6], 2) )
^~~
tests/testthat/test_pad.R:126:52: style: Only use double-quotes.
mnths <- seq(ymd(20160101), length.out = 6, by = 'month')
^~~~~~~
tests/testthat/test_pad.R:130:1: style: lines should not be more than 80 characters.
expect_equal( pad(x, group = c('g1', 'g2'), interval = "months")$m, rep(mnths[2:5], 4) )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:130:34: style: Only use double-quotes.
expect_equal( pad(x, group = c('g1', 'g2'), interval = "months")$m, rep(mnths[2:5], 4) )
^~~~
tests/testthat/test_pad.R:130:40: style: Only use double-quotes.
expect_equal( pad(x, group = c('g1', 'g2'), interval = "months")$m, rep(mnths[2:5], 4) )
^~~~
tests/testthat/test_pad.R:131:37: style: Only use double-quotes.
expect_equal( sw(pad(x, group = c('g1', 'g2'), start_val = mnths[1]))$m,
^~~~
tests/testthat/test_pad.R:131:43: style: Only use double-quotes.
expect_equal( sw(pad(x, group = c('g1', 'g2'), start_val = mnths[1]))$m,
^~~~
tests/testthat/test_pad.R:133:37: style: Only use double-quotes.
expect_equal( sw(pad(x, group = c('g1', 'g2'), end_val = mnths[6]))$m,
^~~~
tests/testthat/test_pad.R:133:43: style: Only use double-quotes.
expect_equal( sw(pad(x, group = c('g1', 'g2'), end_val = mnths[6]))$m,
^~~~
tests/testthat/test_pad.R:138:52: style: Only use double-quotes.
mnths <- seq(ymd(20160101), length.out = 6, by = 'month')
^~~~~~~
tests/testthat/test_pad.R:160:57: style: Only use double-quotes.
check_val <- seq( ymd(20150101), length.out = 4, by = 'year')
^~~~~~
tests/testthat/test_pad.R:162:1: style: lines should not be more than 80 characters.
expect_equal( pad(one_var, by = "x_year", interval = "year")$x_year, check_val)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:163:1: style: lines should not be more than 80 characters.
expect_equal( pad(one_var_grps, by = "x_year", group = 'grp', interval = "year")$x_year,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:163:58: style: Only use double-quotes.
expect_equal( pad(one_var_grps, by = "x_year", group = 'grp', interval = "year")$x_year,
^~~~~
tests/testthat/test_pad.R:166:66: style: Only use double-quotes.
expect_equal( pad(two_var_grps, "year", by = "x_year", group = 'grp')$x_year,
^~~~~
tests/testthat/test_pad.R:198:1: style: lines should not be more than 80 characters.
expect_equal(pad(data.frame(x_year, 1), "year", end_val = as.Date("2021-01-01")) %>%
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_pad.R:200:1: style: lines should not be more than 80 characters.
expect_equal(pad(data.frame(x_year, 1), "year", start_val = as.Date("2012-01-01")) %>%
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_helpers.R:9:23: style: Only use double-quotes.
attr(b_ct_tz_is_NULL, 'tzone') <- NULL
^~~~~~~
tests/testthat/test_thicken_integration.R:34:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_year_2_dts, "year", rounding = "up", by = "ts2")$ts2_year,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:40:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_year_2_dts, "year", by = "ts2", start_val = s)$ts2_year,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:43:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_year_2_dts, "y", by = "ts2", start_val = s)$ts2_year,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:49:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_year, "year", rounding = "up", start_val = s)$time_stamp_year,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:94:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_month_2_dts, "month", rounding = "up", by = "ts2")$ts2_month,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:97:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_month_2_dts, "month", colname = "t", by = "ts2")$t,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:100:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_month_2_dts, "month", by = "ts2", start_val = s)$ts2_month,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:109:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_month, "month", rounding = "up", start_val = s)$time_stamp_month,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:152:1: style: lines should not be more than 80 characters.
expect_equal(suppressWarnings(thicken(coffee_day, "day", start_val = s))$time_stamp_day,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:158:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_day_2_dts, "day", rounding = "up", by = "ts2")$ts2_day,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:227:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_hour_2_dts, "hour", rounding = "up", by = "ts2")$ts2_hour,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:233:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_hour_2_dts, "hour", by = "ts2", start_val = s)$ts2_hour,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:237:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_hour_2_dts, "h", by = "ts2", start_val = s)$ts2_hour,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken_integration.R:243:1: style: lines should not be more than 80 characters.
expect_equal(thicken(coffee_hour, "hour", rounding = "up", start_val = s)$time_stamp_hour,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken.R:49:1: style: lines should not be more than 80 characters.
expect_error(suppressWarnings(thicken(df_with_one_date, interval = "quarter")), NA)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken.R:71:1: style: lines should not be more than 80 characters.
expect_equal(thicken(x, start_val = as.Date("2016-01-02"), interval = "year") %>%
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken.R:81:1: style: lines should not be more than 80 characters.
expect_equal(sw(thicken(x_df, interval = "month"))$x_sec_month %>% get_interval,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken.R:93:1: style: lines should not be more than 80 characters.
day_to_year <- thicken(day_sorted %>% as.data.frame, colname = "x", interval = "year")$x
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken.R:118:1: style: lines should not be more than 80 characters.
expect_equal(colnames(thicken(a_df, interval = "2 days", colname = "jos"))[3], "jos")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken.R:125:1: style: lines should not be more than 80 characters.
expect_equal(sw(dplyr::as_data_frame(df_with_one_date) %>% thicken("2 mon") %>% class),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tests/testthat/test_thicken.R:127:1: style: lines should not be more than 80 characters.
expect_equal(sw(data.table::as.data.table(df_with_one_date) %>% thicken("2 mon") %>%
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~