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/05/13 21:44:00 UTC

[jira] [Updated] (ARROW-12781) [R] Implement is.type() functions for dplyr

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

Ian Cook updated ARROW-12781:
-----------------------------
    Summary: [R] Implement is.type() functions for dplyr  (was: [R] Define ArrowDatum methods for is.type() generic functions)

> [R] Implement is.type() functions for dplyr
> -------------------------------------------
>
>                 Key: ARROW-12781
>                 URL: https://issues.apache.org/jira/browse/ARROW-12781
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: R
>            Reporter: Ian Cook
>            Priority: Major
>
> Define {{ArrowDatum}} methods for the base R generic {{is.type()}} functions, including:
>  * {{is.numeric()}}
>  * {{is.double()}}
>  * {{is.integer()}}
>  * {{is.integer64()}}
>  * {{is.character()}}
>  * {{is.logical()}}
> Maybe also:
>  * {{is.factor() # TRUE for dictionary types}}
>  * {{is.ordered() # TRUE for ordered dictionary types}}
>  * {{is.list() # TRUE for ListArrays}}
> Consider whether it would be better to define some or possibly all these only for dplyr (in {{nse_funcs}}, not as {{ArrowDatum}} methods) to prevent users from being confused when, for example, {{is.list()}} returns {{TRUE}} on an object that is not an R list.
> I think the easiest way to implement this would be to check {{$type_id()}} against the {{Type}} enum values, for example:
> {code:r}
> array$type_id() %in% Type[c("UINT8", "INT8", ...)]
> {code}



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