You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Nic Crane (Jira)" <ji...@apache.org> on 2021/05/24 11:31:00 UTC

[jira] [Assigned] (ARROW-12777) [R] Convert all inputs to Arrow objects in match_arrow and is_in

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

Nic Crane reassigned ARROW-12777:
---------------------------------

    Assignee: Nic Crane

> [R] Convert all inputs to Arrow objects in match_arrow and is_in
> ----------------------------------------------------------------
>
>                 Key: ARROW-12777
>                 URL: https://issues.apache.org/jira/browse/ARROW-12777
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: R
>            Reporter: Nic Crane
>            Assignee: Nic Crane
>            Priority: Minor
>
> If I run:
>  
> {code:java}
> tab <- Table$create(name = rownames(mtcars), mtcars)
> match_arrow(Array$create("Valiant"), tab)
> {code}
>  
> I get `Error: Unrecognized vector instance for type ENVSXP`
> and if I run:
> {code:java}
> match_arrow(c("Valiant"), tab){code}
> I get `Error in match(x, table, ...) : 'match' requires vector arguments ` 
> Also,
> {code:java}
> match_arrow(Array$create(4), mtcars$cyl){code}
> returns `2` as the second argument has been converted to an Arrow object, but yet if I was to run
> {code:java}
> match_arrow(4, mtcars$cyl){code}
> it returns `3` as, in this case, the base version of match has been used.
>  
> This is all a little unintuitive, and so we should convert all inputs to Arrow objects, and also return a user-friendly error message if the input is the wrong kind of Arrow object (as in the first example).



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