Skip to content

Internal error discovered in pivot_wider() #1482

Open
@bpeterson16

Description

@bpeterson16

The function pivot_wider() produces an error:

Error in `rethrow_id_cols_oob()`:
! `i` must be a single string, not an integer vector.
ℹ This is an internal error that was detected in the tidyr package.
  Please report it at <https://github.com/tidyverse/tidyr/issues> with a reprex and the full backtrace.
---
Backtrace:
  1. iris %>% ...
 27. rlang (local) `<fn>`(`<vctrs___>`)
 28. handlers[[1L]](cnd)
 29. tidyr:::rethrow_id_cols_oob(...)
library(tidyverse)
library(dplyr)

pivot <- iris %>%
  pivot_wider(id_cols = 3:5, names_from = Species, values_from = Petal.Width)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorpivoting ♻️pivot rectangular data to different "shapes"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions