-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-44953: [R] Add R bindings for new compute functions #44971
base: main
Are you sure you want to change the base?
Conversation
This PR branch is currently based on #44630 and I'll rebase and force-push once that's merged. I still need to:
|
de2ca98
to
dd01aae
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.
Thanks for this! One minor comment and one question
r/NEWS.md
Outdated
- Added missing dplyr binding for atan (#44953) | ||
- Added bindings for hyperbolig trig functions sinh, cosh, tanh, asinh, acosh, and tanh (#44953) | ||
- Added bindings for expm1 (#44953) |
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.
It doesn't really matter but I wonder if collapsing these into one bullet (since there's one issue) would be better?
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.
One bullet is fine, I'll change it.
cosh = eval_array_expression("cosh", x), | ||
sinh = eval_array_expression("sinh", x), | ||
tanh = eval_array_expression("tanh", x), | ||
acosh = eval_array_expression("acosh_checked", x), | ||
asinh = eval_array_expression("asinh", x), | ||
atanh = eval_array_expression("atanh_checked", x), |
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.
Mostly out of curiosity: did we miss these earlier? Or are they also new?
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.
They're new as of #44630 which hasn't been released.
@@ -15,6 +15,8 @@ | |||
# specific language governing permissions and limitations | |||
# under the License. | |||
|
|||
source("../../extra-tests/helpers.R") |
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.
@jonkeane: I wanted to use skip_if_version_less_than
so I did this but I think the tests can't rely on anything that's buildignored (like the extra-tests
folder is). I think I'd prefer to move these helpers into ./tests
and have the files in ./extra-tests
pull that helper in. Any strong preference?
Rationale for this change
Adds R bindings to newly added hyperbolic trig and Expm1 compute functions. See #44953. Bindings prefer calling
_checked
variants of compute functions where applicable which follows how existing bindings have been implemented.What changes are included in this PR?
base::atan
Are these changes tested?
Yes.
Are there any user-facing changes?
New compute bindings in R.