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

Add strictly parameter to between function #4323

Closed
wants to merge 1 commit into from
Closed

Add strictly parameter to between function #4323

wants to merge 1 commit into from

Conversation

romagnolid
Copy link

Let users specify if a number is strictly between range or not. Default to FALSE for backward compatibility.

> between(1:5, 2, 4)
[1] FALSE  TRUE  TRUE  TRUE FALSE
> between(1:5, 2, 4, strictly = TRUE)
[1] FALSE FALSE  TRUE FALSE FALSE

Let users specify if a number is *strictly* between range or not. Default to FALSE for backward compatibility.
@romainfrancois
Copy link
Member

I'm not sure this is the right approach, a logical argument like strictly only covers 2 of the 4 possible cases.

@romagnolid
Copy link
Author

Hello @romainfrancois, do you think something like include = c("none", "left", "right", "both") would be more useful? Sort of a merge of include.lower and right parameters from cut.

@romainfrancois
Copy link
Member

I'm going to close this now and defer the conversation to tidyverse/funs#26

please follow up there.

@lock
Copy link

lock bot commented Nov 17, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Nov 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants