tsibble icon indicating copy to clipboard operation
tsibble copied to clipboard

Issue with `.full` argument of `*_gaps()` family of functions

Open nhols opened this issue 2 years ago • 0 comments

Having issues with the .full argument of the *_gaps() family of functions. I can't pass .full = F or .full = T but instead have to specify .full = FALSE or .full = TRUE. Also, I can't pass the to the .full argument from a wrapper function


library(tsibble)
#> 
#> Attaching package: 'tsibble'
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, union
packageVersion("tsibble")
#> [1] '1.1.1'

df_ts <-
  tsibble::tsibble(
    year = 2010:2015,
    value = sample(1:100, size = 6),
    index = year
  )

has_gaps(df_ts)
#> # A tibble: 1 x 1
#>   .gaps
#>   <lgl>
#> 1 FALSE
has_gaps(df_ts, .full = FALSE)
#> # A tibble: 1 x 1
#>   .gaps
#>   <lgl>
#> 1 FALSE
has_gaps(df_ts, .full = TRUE)
#> # A tibble: 1 x 1
#>   .gaps
#>   <lgl>
#> 1 FALSE
has_gaps(df_ts, .full = F)
#> Error: `call` must be a quoted call
has_gaps(df_ts, .full = T)
#> Error: `call` must be a quoted call

wrap_has_gaps <- function(df, .full = FALSE) has_gaps(df, .full = .full)
wrap_has_gaps(df_ts)
#> Error: `call` must be a quoted call
wrap_has_gaps(df_ts, .full = FALSE)
#> Error: `call` must be a quoted call
wrap_has_gaps(df_ts, .full = TRUE)
#> Error: `call` must be a quoted call
wrap_has_gaps(df_ts, .full = F)
#> Error: `call` must be a quoted call
wrap_has_gaps(df_ts, .full = T)
#> Error: `call` must be a quoted call

Created on 2022-04-01 by the reprex package (v0.3.0)

nhols avatar Apr 01 '22 09:04 nhols