We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
na_rm
Right now, passing anything that's truthy to na_rm will remove NA values, while values that can't be casted to logical crash in an if statement:
if
yardstick::rmse_vec(c(1, 3, NA), c(2, 5, 2), na_rm = 3) #> [1] 1.581139 yardstick::rmse_vec(c(1, 3, 1), c(2, 5, 2), na_rm = "x") #> Error in if (na_rm) {: argument is not interpretable as logical yardstick::rmse_vec(c(1, 3, NA), c(2, 5, 2), na_rm = c(TRUE, FALSE)) #> Error in if (na_rm) {: the condition has length > 1
Created on 2022-12-10 by the reprex package (v2.0.1)
Would it be possible to check the type of na_rm before the if() statement?
if()
The text was updated successfully, but these errors were encountered:
This seems like a reasonable thing to do. Should properly live in the *_metric_summarizer() functions as a check_na_rm() call
*_metric_summarizer()
check_na_rm()
Sorry, something went wrong.
related to #419
No branches or pull requests
Feature
Right now, passing anything that's truthy to
na_rm
will remove NA values, while values that can't be casted to logical crash in anif
statement:Created on 2022-12-10 by the reprex package (v2.0.1)
Would it be possible to check the type of
na_rm
before theif()
statement?The text was updated successfully, but these errors were encountered: