Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error thrown for an empty variable (only NAs) #108

Open
aspina7 opened this issue Feb 10, 2020 · 1 comment · May be fixed by #109
Open

Error thrown for an empty variable (only NAs) #108

aspina7 opened this issue Feb 10, 2020 · 1 comment · May be fixed by #109

Comments

@aspina7
Copy link

aspina7 commented Feb 10, 2020

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)

@zkamvar
Copy link
Member

zkamvar commented Feb 10, 2020

I'll see what I can do.

@zkamvar zkamvar linked a pull request Feb 10, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants