Skip to content

Printing error involving group_nest, rowwise , and across #6264

@TylerGrantSmith

Description

@TylerGrantSmith

I came upon the following error when attempting to debug some code. I think some combination of group_nest/rowwise/across is constructing a tibble that breaks the tbl formatter.

suppressWarnings(library(tidyverse))
tibble(x = 1:2, y = 1) %>% 
  group_nest(y) %>%
  rowwise() %>% 
  summarise(str = print(across()))
#> Error in `summarise()`:
#> ! Problem while computing `str = print(across())`.
#> i The error occurred in row 1.
#> Caused by error in `[<-.data.frame`:
#> ! replacement element 2 is a matrix/data frame of 2 rows, need 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions