linelist
linelist copied to clipboard
Error thrown for an empty variable (only NAs)
Hello friends - was trying to run guess_dates over one of several date variables. Turns out one was empties, initial as a logical var, so switched it to a char and still got error thrown (see reprex). Thanks!
test_df <- dplyr::tibble(empty_var = as.character(c(NA, NA, NA, NA, NA)))
test_df
#> # A tibble: 5 x 1
#> empty_var
#> <chr>
#> 1 <NA>
#> 2 <NA>
#> 3 <NA>
#> 4 <NA>
#> 5 <NA>
linelist::guess_dates(test_df$empty_var)
#> Error in if (prop_successful < (1 - error_tolerance)) {: missing value where TRUE/FALSE needed
Created on 2020-02-10 by the reprex package (v0.3.0)
I'll see what I can do.