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

condition error in checkInverted #133

Open
ggrittz opened this issue Feb 20, 2025 · 0 comments
Open

condition error in checkInverted #133

ggrittz opened this issue Feb 20, 2025 · 0 comments

Comments

@ggrittz
Copy link

ggrittz commented Feb 20, 2025

In Line 80 of plantR::checkInverted, in cases where check_these <- check1$tmp.country.gazet == check1$NAME_0 is equal to a vector of NA, the following condition if (any(check_these)) returns NA when a TRUE/FALSE is expected, resulting in:

any(check_these)
[1] NA

Error in if (any(check_these)) { : valor ausente onde TRUE/FALSE necessário

and stopping the next steps. Maybe an if(any(check_these, na.rm = TRUE)) suffices for these cases?

any(check_these, na.rm = TRUE)
[1] FALSE

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

No branches or pull requests

1 participant