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

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

     [ https://issues.apache.org/jira/browse/ARROW-13094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ian Cook updated ARROW-13094:
-----------------------------
    Description: 
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
{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()}}.

  was:
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()}}.


> [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
>            Priority: Major
>             Fix For: 5.0.0
>
>
> 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
> {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)