-
Notifications
You must be signed in to change notification settings - Fork 38
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
feat: make $otherwise
optional in when-then-otherwise expressions
#836
Conversation
$then(...)
$then(...)
488e6c8
to
88ffd99
Compare
$then(...)
$otherwise
optional in when-then-otherwise expressions
88ffd99
to
a4cd671
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks great, thanks! Just some minor comments on docs
#' `$otherwise()` when you arrive at the end of your chain. | ||
#' Note that one difference with the Python implementation is that we *must* | ||
#' end the chain with an `$otherwise()` statement. | ||
#' `when-then-otherwise` is similar to R [`ifelse()`]. Always initiated by a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#' `when-then-otherwise` is similar to R [`ifelse()`]. Always initiated by a | |
#' `when-then-otherwise` is similar to R [`ifelse()`]. It is always initiated by a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, this text is copied from the Python package, so I would like to leave it as is.
#' * `<ChainedThen>$otherwise()`returns an [Expression][Expr_class] object. | ||
#' If none of the conditions are `true`, an optional | ||
#' `$otherwise(<value if all statements are false>)` can be appended at the end. | ||
#' If not appended, and none of the conditions are `true`, `null` will be returned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#' If not appended, and none of the conditions are `true`, `null` will be returned. | |
#' If not appended, and none of the conditions are `true`, it will return `null`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
Close #599