tidyverts / tsibble

Tidy Temporal Data Frames and Tools
https://tsibble.tidyverts.org
GNU General Public License v3.0
530 stars 49 forks source link

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

Closed nhols closed 1 year ago

nhols commented 2 years ago

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)

earowang commented 1 year ago

Thanks for providing such a comprehensive reprex. 👍 And sorry for taking so long to respond. Fixed.