Skip to content

Commit

Permalink
restoring to v041
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinTh committed Apr 3, 2019
1 parent 49e78d5 commit e8aeb24
Show file tree
Hide file tree
Showing 76 changed files with 63 additions and 106 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: padr
Type: Package
Title: Quickly Get Datetime Data Ready for Analysis
Version: 0.4.2
Version: 0.4.1
Author: Edwin Thoen
Maintainer: Edwin Thoen <[email protected]>
Description: Transforms datetime data into a format ready for analysis.
Expand Down
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified NAMESPACE
100644 → 100755
Empty file.
12 changes: 4 additions & 8 deletions NEWS.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# padr 0.4.2
# padr 0.4.9000

- Patch release requested by CRAN maintainers. Removed `sample` function from unit test.

##################################################

# padr 0.4.1
## Bug Fixes / Enhancements

- Patch release requested by CRAN maintainers. Declaring `lintr` as a dependency in tests.
- Error within `padr` for `break_above` error message is corrected. No longer prints the number of millions in millions (HT Sharla Gelfand).

##################################################

Expand All @@ -20,7 +16,7 @@

* `get_interval` is sped up significantly:

- to convert date to character `format` is used, instead of `as.character`. For large vectors it is 4 to 5 times faster.
- to convert date to character `format` is used, instead of `as.character`. For large vectors it 4 to 5 times faster.

## New Features

Expand Down
1 change: 0 additions & 1 deletion R/RcppExports.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ round_down_core <- function(a, b) {
round_up_core <- function(a, b) {
.Call('_padr_round_up_core', PACKAGE = 'padr', a, b)
}

Empty file modified R/check_date_variables.R
100644 → 100755
Empty file.
Empty file modified R/closest_weekday.R
100644 → 100755
Empty file.
Empty file modified R/create_emrgency.R
100644 → 100755
Empty file.
Empty file modified R/fill_functions.R
100644 → 100755
Empty file.
Empty file modified R/formatting_funcs.R
100644 → 100755
Empty file.
Empty file modified R/get_interval.R
100644 → 100755
Empty file.
6 changes: 0 additions & 6 deletions R/helpers.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ is_df <- function(x){
}
}

has_rows <- function(x) {
if (nrow(x) == 0) {
stop("x has no rows", call. = FALSE)
}
}

check_start_and_end <- function(start_val, end_val) {
if (!is.null(start_val)) {
if (! (inherits(start_val, "Date") | inherits(start_val, "POSIXt")) ){
Expand Down
2 changes: 0 additions & 2 deletions R/pad.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ pad <- function(x,
group = NULL,
break_above = 1){
is_df(x)
has_rows(x)

check_start_and_end(start_val, end_val)
group <- get_dplyr_groups(x, group)

Expand Down
2 changes: 0 additions & 2 deletions R/pad_cust.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ pad_cust <- function(x,
group = NULL,
drop_last_spanned = TRUE){
is_df(x)
has_rows(x)

stop_not_datetime(spanned)
group <- get_dplyr_groups(x, group)

Expand Down
3 changes: 1 addition & 2 deletions R/pad_int.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ pad_int <- function(x,
start_val = NULL,
end_val = NULL,
group = NULL,
step = 1) {
step = 1){
is_df(x)
has_rows(x)

group <- get_dplyr_groups(x, group)
if (!all(group %in% colnames(x))) {
Expand Down
Empty file modified R/span.R
100644 → 100755
Empty file.
Empty file modified R/span_date.R
100644 → 100755
Empty file.
Empty file modified R/subset_span.R
100644 → 100755
Empty file.
23 changes: 12 additions & 11 deletions R/thicken.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
#' than the lowest value of the input datetime variable, with all time units on
#' default value. Specify \code{start_val} as an offset if you want the range
#' to be nonstandard.
#' @param drop Should the original datetime variable be dropped from the
#' returned data frame? Defaults to \code{FALSE}.
#' @return The data frame \code{x} with the variable added to it.
#' @details When the datetime variable contains missing values, they are left
#' in place in the dataframe. The added column with the new datetime variable,
Expand Down Expand Up @@ -67,11 +65,9 @@ thicken <- function(x,
rounding = c('down',
'up'),
by = NULL,
start_val = NULL,
drop = FALSE) {
start_val = NULL) {

is_df(x)
has_rows(x)

original_data_frame <- x
x <- as.data.frame(x)
Expand All @@ -86,6 +82,11 @@ thicken <- function(x,
interval_converted$interval <- uniform_interval_name(interval_converted$interval)
rounding <- match.arg(rounding)

if (check_for_sorting(dt_var)){
warning('Datetime variable was unsorted, result will be unsorted as well.',
call. = FALSE)
}

if (inherits(start_val, 'POSIXt') & inherits(dt_var, 'POSIXt')) {
start_val <- enforce_time_zone(start_val, dt_var)
}
Expand Down Expand Up @@ -120,8 +121,6 @@ the interval specified is too low for the interval of the datetime variable", ca
return_frame <- dplyr::bind_cols(x, thickened_frame)
colnames(return_frame)[ncol(return_frame)] <- colname

if (drop) return_frame <- remove_original_var(return_frame, dt_var_name)

set_to_original_type(return_frame, original_data_frame)
}

Expand Down Expand Up @@ -214,6 +213,12 @@ start_val_after_min_dt <- function(start_val, dt_var) {
}
}

check_for_sorting <- function(dt_var) {
# filter out missing values, there will be a warning thrown for them later
dt_var <- dt_var[!is.na(dt_var)]
!all(dt_var[1:(length(dt_var) - 1)] <= dt_var[2:length(dt_var)])
}

check_for_NA_thicken <- function(dt_var, dt_var_name, colname) {
if (sum(is.na(dt_var)) > 0) {
dt_var <- dt_var[!is.na(dt_var)]
Expand All @@ -235,7 +240,3 @@ add_na_to_thicken <- function(thickened, na_ind) {
attr(return_var_ord, "tzone") <- attr(thickened, "tzone")
return(return_var_ord)
}

remove_original_var <- function(x, var_name) {
x[, colnames(x) != var_name]
}
13 changes: 6 additions & 7 deletions R/thicken_cust.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#' @param by Only needs to be specified when \code{x} contains multiple
#' variables of class \code{Date}, \code{POSIXct} or \code{POSIXlt}.
#' Indicates which to use for thickening.
#' @param drop Should the original datetime variable be dropped from the
#' returned data frame? Defaults to \code{FALSE}.
#' @details
#' Only rounding down is available for custom thickening.
#' @return The data frame \code{x} with the variable added to it.
Expand All @@ -31,11 +29,9 @@
thicken_cust <- function(x,
spanned,
colname,
by = NULL,
drop = FALSE) {
by = NULL) {

is_df(x)
has_rows(x)

original_data_frame <- x
x <- as.data.frame(x)
Expand All @@ -44,6 +40,11 @@ thicken_cust <- function(x,
dt_var <- dt_var_info$dt_var
dt_var_name <- dt_var_info$dt_var_name

if (check_for_sorting(dt_var)){
warning('Datetime variable was unsorted, result will be unsorted as well.',
call. = FALSE)
}

is_datetime(spanned)
if (inherits(spanned, 'POSIXt') & inherits(dt_var, 'POSIXt')) {
spanned <- enforce_time_zone(spanned, dt_var)
Expand All @@ -67,8 +68,6 @@ thicken_cust <- function(x,
return_frame <- dplyr::bind_cols(x, thickened_frame)
colnames(return_frame)[ncol(return_frame)] <- colname

if (drop) return_frame <- remove_original_var(return_frame, dt_var_name)

set_to_original_type(return_frame, original_data_frame)
}

Expand Down
Empty file modified R/thicken_helpers.R
100644 → 100755
Empty file.
Empty file modified README.Rmd
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
26 changes: 18 additions & 8 deletions cran-comments.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
Submissing patch release
Resubmission

As requested by Kurt Hornik, the behavior of sample() will be changed from R 3.6 onwards. Making some unit tests fail. The sampled data are replaced by hard coded values so this should be evaded now.
As requested by Uwe Ligges changed link to other vignette in padr_custom.Rmd from

https://cran.r-project.org/web/packages/padr/vignettes/padr.html

to

https://CRAN.R-project.org/package=padr

so it is in CRAN URL canonical form.

################################################

# padr v0.4.2
# padr v0.4.0

## Test environments
* local OS X install, R 3.5
* ubuntu 14.04.5 (on travis-ci), R 3.5
* win-builder
* local OS X install, R 3.4.2
* ubuntu 14.04.5 (on travis-ci), R 3.4.2
* win-builder (devel and release)

## R CMD check results

All tests passed without Errors, Warnings, or Notes on all platforms (including "checking for unstated dependencies in 'tests'").
0 errors | 0 warnings | 0 notes

On win-builder only there was the standard NOTE
* checking CRAN incoming feasibility

There is one reverse dependency timetk. Since this is patch release the maintainers are not informed, changes cannot break dependencies.
There is one reverse dependency timetk. Its maintainer Matt Dancho has received a personal email and assured me the new version works with timetk.
Empty file modified data/coffee.rda
100644 → 100755
Empty file.
Empty file modified data/emergency.rda
100644 → 100755
Empty file.
Empty file modified man/center_interval.Rd
100644 → 100755
Empty file.
Empty file modified man/closest_weekday.Rd
100644 → 100755
Empty file.
Empty file modified man/coffee.Rd
100644 → 100755
Empty file.
Empty file modified man/emergency.Rd
100644 → 100755
Empty file.
Empty file modified man/fill_by_function.Rd
100644 → 100755
Empty file.
Empty file modified man/fill_by_prevalent.Rd
100644 → 100755
Empty file.
Empty file modified man/fill_by_value.Rd
100644 → 100755
Empty file.
Empty file modified man/format_interval.Rd
100644 → 100755
Empty file.
Empty file modified man/get_interval.Rd
100644 → 100755
Empty file.
Empty file modified man/pad.Rd
100644 → 100755
Empty file.
Empty file modified man/pad_cust.Rd
100644 → 100755
Empty file.
Empty file modified man/pad_int.Rd
100644 → 100755
Empty file.
Empty file modified man/span_around.Rd
100644 → 100755
Empty file.
Empty file modified man/span_date.Rd
100644 → 100755
Empty file.
Empty file modified man/span_time.Rd
100644 → 100755
Empty file.
Empty file modified man/subset_span.Rd
100644 → 100755
Empty file.
5 changes: 1 addition & 4 deletions man/thicken.Rd
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions man/thicken_cust.Rd
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified padr.Rproj
100644 → 100755
Empty file.
Empty file modified scripts/emergency_data.R
100644 → 100755
Empty file.
Empty file modified src/.Rapp.history
100644 → 100755
Empty file.
Empty file modified src/.gitignore
100644 → 100755
Empty file.
Empty file modified src/RcppExports.cpp
100644 → 100755
Empty file.
Empty file modified src/padr_init.c
100644 → 100755
Empty file.
Empty file modified src/round_down_core.cpp
100644 → 100755
Empty file.
Empty file modified src/round_up_core.cpp
100644 → 100755
Empty file.
Empty file modified src/symbols.rds
100644 → 100755
Empty file.
Empty file modified tests/testthat.R
100644 → 100755
Empty file.
Empty file modified tests/testthat/library.R
100644 → 100755
Empty file.
Empty file modified tests/testthat/test_check_date_variables.R
100644 → 100755
Empty file.
Empty file modified tests/testthat/test_closest_weekday.R
100644 → 100755
Empty file.
28 changes: 15 additions & 13 deletions tests/testthat/test_fill_functions.R
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
source("library.R")

x_df <- data_frame(x = as.Date(c("2019-01-01", "2019-01-04", "2019-01-06")),
y1 = c(3, 5, 6),
y2 = c(11, 14, 14),
y3 = rep(10, 3),
y4 = c("A", "A", "B")) %>% pad()
set.seed(543)
x <- seq(as.Date("2016-01-01"), by = "day", length.out = 366)
x <- x[sample(1:366, 200)] %>% sort
x_df <- data_frame(x = x,
y1 = runif(200, 10, 20) %>% round,
y2 = runif(200, 1, 50) %>% round,
y3 = rep(10, 200) %>% round,
y4 = rep(letters[1:4], c(80, 60, 40, 20))) %>% pad

context("Test the fill functions")

Expand All @@ -31,17 +33,17 @@ test_that("fill_by_value gives expected outcomes", {

test_that("fill_by_function gives expected outcomes", {
expect_error( fill_by_function(x_df, y1, fun = y2) )
expect_equal( fill_by_function(x_df, y1)$y1 %>% median, 4 + 2 / 3)
expect_equal( fill_by_function(x_df, y1, y2)$y1 %>% median, 4 + 2 / 3)
expect_equal( fill_by_function(x_df, y1, y2)$y2 %>% median, 13)
expect_equal( fill_by_function(x_df, y1, fun = median)$y1 %>% median, 5)
expect_equal( fill_by_function(x_df, y1, y2, fun = median)$y1 %>% median, 5)
expect_equal( fill_by_function(x_df, y1)$y1 %>% median, 14.77)
expect_equal( fill_by_function(x_df, y1, y2)$y1 %>% median, 14.77)
expect_equal( fill_by_function(x_df, y1, y2)$y2 %>% median, 22.765)
expect_equal( fill_by_function(x_df, y1, fun = median)$y1 %>% median, 15)
expect_equal( fill_by_function(x_df, y1, y2, fun = median)$y1 %>% median, 15)
})

test_that("fill_by_prevalent gives expected outcomes", {
expect_equal( fill_by_prevalent(x_df, y4)$y4[2], "A")
expect_equal( fill_by_prevalent(x_df, y4)$y4[2], "a")
expect_equal( fill_by_prevalent(x_df, y3)$y3[2], 10)
expect_equal( fill_by_prevalent(x_df, y3, y4)$y4[2], "A")
expect_equal( fill_by_prevalent(x_df, y3, y4)$y4[2], "a")
expect_equal( fill_by_prevalent(x_df, y3, y4)$y3[2], 10)
expect_error( fill_by_prevalent(x_df, y1))
})
Expand Down
Empty file modified tests/testthat/test_formatting_funcs.R
100644 → 100755
Empty file.
Empty file modified tests/testthat/test_get_interval.R
100644 → 100755
Empty file.
Empty file modified tests/testthat/test_helpers.R
100644 → 100755
Empty file.
Empty file modified tests/testthat/test_pad.R
100644 → 100755
Empty file.
Empty file modified tests/testthat/test_pad_cust.R
100644 → 100755
Empty file.
Empty file modified tests/testthat/test_pad_int.R
100644 → 100755
Empty file.
Empty file modified tests/testthat/test_span.R
100644 → 100755
Empty file.
Empty file modified tests/testthat/test_span_date.R
100644 → 100755
Empty file.
Empty file modified tests/testthat/test_subset_span.R
100644 → 100755
Empty file.
18 changes: 4 additions & 14 deletions tests/testthat/test_thicken.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ test_that("thicken throws error when asked interval is lower", {
expect_error( thicken(x_month, interval = "year"), NA)
})

test_that("thicken gives warning when unordered", {
expect_warning( thicken(x_month_unordered, interval = "quarter") )
expect_warning( thicken(x_month, interval = "quarter"), NA)
})

test_that("thicken gives informed error when start_val is wrong class", {
expect_error(thicken(x_month, start_val = "2017-01-01",
Expand Down Expand Up @@ -141,17 +145,3 @@ Returned dataframe contains original observations, with NA values for d and d_we
expect_equal(coffee_na_thickened %>% filter(is.na(d_week)) %>% nrow, 1)
expect_equal(coffee_na_thickened$d[3] %>% as.character(), NA_character_)
})

context("thicken drop argument")
test_that("the drop argument gives the desired result", {
hourly <- ymd_h(c("20160707 09",
"20160707 09",
"20160709 13",
"20160710 10"), tz = "CET")
coffee_hour <- coffee %>% mutate(time_stamp_hour = hourly)
no_drop <- coffee_hour
with_drop <- coffee_hour %>% select(-time_stamp)
expect_equal(thicken(coffee, "hour"), no_drop)
expect_equal(thicken(coffee, "hour", drop = FALSE), no_drop)
expect_equal(thicken(coffee, "hour", drop = TRUE), with_drop)
})
23 changes: 0 additions & 23 deletions tests/testthat/test_thicken_cust.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,3 @@ test_that("thicken_cust works properly", {
spanned_2 <- spanned_asym[c(2, 2)]
expect_equal(thicken_cust_2, spanned_2)
})

context("thicken_cust drop argument")
test_that("the drop argument gives the desired result", {
hourly <- ymd_h(c("20160707 09",
"20160707 09",
"20160709 13",
"20160710 10"), tz = "CET")
coffee_hour <- coffee %>% mutate(time_stamp_hour = hourly)
no_drop <- coffee_hour
with_drop <- coffee_hour %>% select(-time_stamp)

expect_equal(sw(thicken_cust(coffee,
spanned = hourly,
colname = "time_stamp_hour")), no_drop)
expect_equal(sw(thicken_cust(coffee,
spanned = hourly,
colname = "time_stamp_hour",
drop = FALSE)), no_drop)
expect_equal(sw(thicken_cust(coffee,
spanned = hourly,
colname = "time_stamp_hour",
drop = TRUE)), with_drop)
})
Empty file modified tests/testthat/test_thicken_helpers.R
100644 → 100755
Empty file.
Empty file modified tests/testthat/test_thicken_integration.R
100644 → 100755
Empty file.
Empty file modified tests/testthat/test_zzz_lintr.R
100644 → 100755
Empty file.
Empty file modified vignettes/padr.Rmd
100644 → 100755
Empty file.
Empty file modified vignettes/padr_custom.Rmd
100644 → 100755
Empty file.
Empty file modified vignettes/padr_implementation.Rmd
100644 → 100755
Empty file.
Empty file modified vignettes/thicken_graph.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit e8aeb24

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests/testthat/test_fill_functions.R:52:1: style: lines should not be more than 80 characters.

x <- suppressWarnings(coffee %>% thicken('day') %>% group_by(time_stamp_day) %>%
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_fill_functions.R:52:44: style: Only use double-quotes.

x <- suppressWarnings(coffee %>% thicken('day') %>% group_by(time_stamp_day) %>%
                                           ^~~~~

tests/testthat/test_formatting_funcs.R:70:1: style: lines should not be more than 80 characters.

​  expect_equal(find_next_val(span_time(201601, len_out = 3, by = "week"), 7 * 24 * 3600),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_formatting_funcs.R:83:1: style: lines should not be more than 80 characters.

​  expect_equal(gutl(span_time(201601, len_out = 2)), round(30.41667 * 24 * 3600))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_formatting_funcs.R:87:1: style: lines should not be more than 80 characters.

​  expect_equal(gutl(span_time(20160101, len_out = 5)[c(1, 3, 5)]), 2 * 24 * 3600)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_formatting_funcs.R:89:1: style: lines should not be more than 80 characters.

​  expect_equal(gutl(span_time("20160101 00", len_out = 10)[c(2, 5, 8)]), 3600 * 3)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_formatting_funcs.R:91:1: style: lines should not be more than 80 characters.

​  expect_equal(gutl(span_time("20160101 00", len_out = 10)[c(2, 5, 8)]), 3600 * 3)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_formatting_funcs.R:129:1: style: lines should not be more than 80 characters.

​               c("2016-01-01 2016-01-03", "2016-01-03 2016-01-04", "2016-01-04 2016-01-05"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_formatting_funcs.R:131:1: style: lines should not be more than 80 characters.

​               c("2016-01-01 2016-01-03", "2016-01-03 2016-01-04", "2016-01-04 2016-01-06"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_get_interval.R:200:1: style: lines should not be more than 80 characters.

​  expect_error(stop_on_NA(x2), "interval cannot be determined when x contains NAs")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_get_interval.R:202:1: style: lines should not be more than 80 characters.

​  expect_error(get_interval(x2), "interval cannot be determined when x contains NAs")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_pad_cust.R:9:1: style: lines should not be more than 80 characters.

Either run thicken_cust in combination with aggregation first, or rerun this function
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_pad_cust.R:49:1: style: lines should not be more than 80 characters.

val  = c(1, NA, 1, 1, NA, 1, 1, NA, 1, 1, NA, 1))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_pad_cust.R:68:1: style: lines should not be more than 80 characters.

one_group %>% group_by(grp) %>% pad_cust(spanned = sp, drop_last_spanned = FALSE),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_pad_cust.R:83:1: style: lines should not be more than 80 characters.

two_group %>% group_by(grp1) %>% pad_cust(span = sp, drop_last_spanned = FALSE),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_pad_cust.R:88:1: style: lines should not be more than 80 characters.

​    pad_cust(two_group, span = sp, group = c("grp1", "grp2"), drop_last_spanned = FALSE),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_pad_cust.R:93:1: style: lines should not be more than 80 characters.

two_group %>% group_by(grp1, grp2) %>% pad_cust(span = sp, drop_last_spanned = FALSE),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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 = 5, by = 'month')
                                                   ^~~~~~~

tests/testthat/test_pad.R:162:52: style: Only use double-quotes.

​  expect_error(pad(coffee, group = c("time_stamp", 'grp')))
                                                   ^~~~~

tests/testthat/test_pad.R:173:57: style: Only use double-quotes.

check_val <- seq( ymd(20150101), length.out = 4, by = 'year')
                                                        ^~~~~~

tests/testthat/test_pad.R:175: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:176: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:176: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:179: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:211: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:213: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_pad.R:228:1: style: lines should not be more than 80 characters.

"2016-07-07 09:11:21", "2016-07-07 09:46:48", "2016-07-09 13:25:17", "2016-07-10 10:45:11"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_span_date.R:93:1: style: lines should not be more than 80 characters.

year_span <- seq.Date(as.Date("2011-01-01"), as.Date("2015-01-01"), by = "year")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_span_date.R:94:1: style: lines should not be more than 80 characters.

month_span <- seq.Date(as.Date("2011-01-01"), as.Date("2015-01-01"), by = "month")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_span_date.R:113:1: style: lines should not be more than 80 characters.

hour_span <- seq.POSIXt(p("2011-01-01 00:00:00"), p("2011-01-01 23:00:00"), by = "hour")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_span_date.R:114:1: style: lines should not be more than 80 characters.

min_span <- seq.POSIXt(p("2011-01-01 00:00:00"), p("2011-01-01 00:25:00"), by = "min")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_span.R:118:1: style: lines should not be more than 80 characters.

​  expect_error(span_around(coffee$time_stamp, "hour", start_shift = "12 hour"), NA)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_span.R:120:1: style: lines should not be more than 80 characters.

​  expect_error(span_around(coffee$time_stamp, "hour", end_shift = "12 hour"), NA)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_span.R:144:1: style: lines should not be more than 80 characters.

​  expect_equal(span_around(x, "day", start_shift = "1 day")[1], as.Date("2016-07-08"))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_thicken_cust.R:1:8: style: Only use double-quotes.

​source('library.R')
       ^~~~~~~~~~~

tests/testthat/test_thicken_cust.R:11:1: style: lines should not be more than 80 characters.

"Dropping all values in the datetime var that are smaller than smallest spanned")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_thicken_cust.R:34:1: style: lines should not be more than 80 characters.

"2016-07-07 09:11:21", "2016-07-07 09:46:48", "2016-07-09 13:25:17", "2016-07-10 10:45:11"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_thicken_cust.R:41:1: style: lines should not be more than 80 characters.

"Dropping all values in the datetime var that are smaller than smallest spanned")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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:48: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:70: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:80: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:92: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:117: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:124: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:126: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") %>%
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/test_thicken.R:142:1: style: lines should not be more than 80 characters.

Returned dataframe contains original observations, with NA values for d and d_week.")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please sign in to comment.