You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Ian Cook (Jira)" <ji...@apache.org> on 2021/06/16 14:18:00 UTC

[jira] [Created] (ARROW-13094) [R] Bindings for sign()

Ian Cook created ARROW-13094:
--------------------------------

             Summary: [R] Bindings for sign()
                 Key: ARROW-13094
                 URL: https://issues.apache.org/jira/browse/ARROW-13094
             Project: Apache Arrow
          Issue Type: Improvement
          Components: R
            Reporter: Ian Cook
             Fix For: 5.0.0


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

I think this should be as simple as just adding
{code:java}
"sign" = "sign"{code}
to {{.binary_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()}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)