Skip to content

Internal error in summarise() #7693

@DavisVaughan

Description

@DavisVaughan
library(dplyr)

penguins |>
  summarize(
    .by = species,
    across(everything(), identity),
    spline = data.frame(spline(bill_len, bill_dep, n=4L))
  )
#> Error in names(dots)[[i]]: subscript out of bounds

Seems like i is 8, and dots is only length 2

Image

I think i is the post-expanded index, i.e. it increments by 1 after each column across(everything(), identity) is applied to (7 cols), but we wanted the index incremented by 1 after each expression that we run, i.e. across(everything(), identity) should count as 1 in total.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions