You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "eitsupi (via GitHub)" <gi...@apache.org> on 2023/05/10 16:00:49 UTC

[GitHub] [arrow] eitsupi opened a new issue, #35534: [R] Column order after `group_by(foo) |> select(...)` is different from dplyr

eitsupi opened a new issue, #35534:
URL: https://github.com/apache/arrow/issues/35534

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   Related to #35473
   
   I corrected the column order after `mutate` and `transmute` in #35473, but it seems that it needs to be corrected in `select` as well.
   
   The columns used for groups should to be moved to the left.
   
   ``` r
   mtcars |> dplyr::group_by(cyl) |> dplyr::select(mpg)
   #> Adding missing grouping variables: `cyl`
   #> # A tibble: 32 × 2
   #> # Groups:   cyl [3]
   #>      cyl   mpg
   #>    <dbl> <dbl>
   #>  1     6  21
   #>  2     6  21
   #>  3     4  22.8
   #>  4     6  21.4
   #>  5     8  18.7
   #>  6     6  18.1
   #>  7     8  14.3
   #>  8     4  24.4
   #>  9     4  22.8
   #> 10     6  19.2
   #> # … with 22 more rows
   mtcars |> arrow::arrow_table() |> dplyr::group_by(cyl) |> dplyr::select(mpg) |> dplyr::collect()
   #> # A tibble: 32 × 2
   #> # Groups:   cyl [3]
   #>      mpg   cyl
   #>    <dbl> <dbl>
   #>  1  21       6
   #>  2  21       6
   #>  3  22.8     4
   #>  4  21.4     6
   #>  5  18.7     8
   #>  6  18.1     6
   #>  7  14.3     8
   #>  8  24.4     4
   #>  9  22.8     4
   #> 10  19.2     6
   #> # … with 22 more rows
   ```
   
   <sup>Created on 2023-05-10 with [reprex v2.0.2](https://reprex.tidyverse.org)</sup>
   
   ### Component(s)
   
   R


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] nealrichardson commented on issue #35534: [R] Column order after `group_by(foo) |> select(...)` is different from dplyr

Posted by "nealrichardson (via GitHub)" <gi...@apache.org>.
nealrichardson commented on issue #35534:
URL: https://github.com/apache/arrow/issues/35534#issuecomment-1545704149

   Thanks. This would be in `ensure_group_vars()`, and it looks like we might also want to mimic the `Adding missing grouping variables` message to be explicit when this happens.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] paleolimbot closed issue #35534: [R] Column order after `group_by(foo) |> select(...)` is different from dplyr

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot closed issue #35534: [R] Column order after `group_by(foo) |> select(...)` is different from dplyr
URL: https://github.com/apache/arrow/issues/35534


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org