Subsets data to remove any call with a date and time canceled.

csb_canceled(.data, var, drop = TRUE)

Arguments

.data

A tibble or data frame

var

Name of the column containing cancellation timestamps

drop

A logical scalar; if TRUE, removes the now empty column that had contained cancellation date and time, otherwise if FALSE the empty column is retained.

Value

Returns a tibble with the rows containing dates and times for the given variable removed.

Examples

csb_canceled(january_2018, var = "datecancelled")
#> # A tibble: 1,515 x 16 #> requestid datetimeinit probaddress probaddtype callertype neighborhood #> <dbl> <dttm> <chr> <chr> <chr> <dbl> #> 1 1049265 2018-01-01 00:48:30 75 WILLMOR… A WEB 8 #> 2 1049265 2018-01-01 00:48:30 75 WILLMOR… A WEB 8 #> 3 1049266 2018-01-01 05:29:06 6739 VERMO… A WEB 1 #> 4 1049267 2018-01-01 08:53:07 5444 ITASK… A WEB 7 #> 5 1049268 2018-01-01 09:13:22 CASS AVE &… B PHONE 60 #> 6 1049269 2018-01-01 10:12:26 6441 LLOYD… A WEB 42 #> 7 1049270 2018-01-01 10:52:32 3100 WINNE… B PHONE 19 #> 8 1049271 2018-01-01 10:54:43 S GRAND AV… B PHONE 25 #> 9 1049272 2018-01-01 11:07:02 SIDNEY ST … B WEB 25 #> 10 1049273 2018-01-01 12:05:40 5400 N BRO… B PHONE 79 #> # … with 1,505 more rows, and 10 more variables: ward <dbl>, problemcode <chr>, #> # description <chr>, submitto <chr>, status <chr>, dateinvtdone <dttm>, #> # datetimeclosed <dttm>, prjcompletedate <dttm>, srx <dbl>, sry <dbl>
csb_canceled(january_2018, var = "datecancelled", drop = FALSE)
#> # A tibble: 1,515 x 17 #> requestid datetimeinit probaddress probaddtype callertype neighborhood #> <dbl> <dttm> <chr> <chr> <chr> <dbl> #> 1 1049265 2018-01-01 00:48:30 75 WILLMOR… A WEB 8 #> 2 1049265 2018-01-01 00:48:30 75 WILLMOR… A WEB 8 #> 3 1049266 2018-01-01 05:29:06 6739 VERMO… A WEB 1 #> 4 1049267 2018-01-01 08:53:07 5444 ITASK… A WEB 7 #> 5 1049268 2018-01-01 09:13:22 CASS AVE &… B PHONE 60 #> 6 1049269 2018-01-01 10:12:26 6441 LLOYD… A WEB 42 #> 7 1049270 2018-01-01 10:52:32 3100 WINNE… B PHONE 19 #> 8 1049271 2018-01-01 10:54:43 S GRAND AV… B PHONE 25 #> 9 1049272 2018-01-01 11:07:02 SIDNEY ST … B WEB 25 #> 10 1049273 2018-01-01 12:05:40 5400 N BRO… B PHONE 79 #> # … with 1,505 more rows, and 11 more variables: ward <dbl>, problemcode <chr>, #> # description <chr>, submitto <chr>, status <chr>, dateinvtdone <dttm>, #> # datetimeclosed <dttm>, prjcompletedate <dttm>, datecancelled <dttm>, #> # srx <dbl>, sry <dbl>