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

Prefer is.null() (and is.na()) over missing() #354

Merged
merged 8 commits into from
Aug 4, 2023

Conversation

jack-davison
Copy link
Collaborator

This PR aims to fix #353.

In short, it implements a preference for is.na() and is.null() over missing() for several arguments in directional analysis functions.

Previously, one couldn't recreate the default behaviour of functions like polarFreq() while still passing an argument to, e.g., breaks.

For example, polarFreq(mydata, breaks = ...). There was nothing that could be passed to breaks to recreate the default behaviour. This made it difficult to program with polarFreq() (e.g., in openairmaps::freqMap()). There is a more complete example in #353.

This PR fixes this issue. Effort has been made to make the fix back-compatible with previous versions of {openair}.

@jack-davison jack-davison changed the title Fix/programming refinements Prefer is.null() (and is.na()) over missing() Jul 5, 2023
@davidcarslaw davidcarslaw merged commit 2fa97c8 into master Aug 4, 2023
2 checks passed
@davidcarslaw
Copy link
Owner

Thanks!

@jack-davison jack-davison deleted the fix/programming-refinements branch August 31, 2023 08:53
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 this pull request may close these issues.

[Bug]: Frequent use of missing() makes {openair} difficult to program with
3 participants