Skip to content

[R] Bindings for sign() #28799

Description

@asfimport

ARROW-12861 adds a sign kernel to the C++ library. Add a mapping to this in the R package.

I think this should be as simple as just adding

"sign" = "sign",

to .unary_function_map in expression.R, plus a simple test.

Note that the C++ library's sign kernel returns integer output whereas base R's sign function returns numeric (double) output, so a test written with expect_dplyr_equal() might fail unless it explicitly converts the output from sign() using as.numeric() or as.integer().

Reporter: Ian Cook / @ianmcook
Assignee: Neal Richardson / @nealrichardson

Related issues:

Note: This issue was originally created as ARROW-13094. Please see the migration documentation for further details.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions