You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
library(tidyr)
spec<- tibble(.name="Release", .value="seen", station=fish_encounters$station[1])
spec#> # A tibble: 1 × 3#> .name .value station#> <chr> <chr> <fct> #> 1 Release seen Release
pivot_wider_spec(
fish_encounters[0,],
spec
)
#> Error: Can't subset elements that don't exist.#> x Location 1 doesn't exist.#> ℹ There are only 0 elements.# This kind of thing generally works and gives NA
pivot_wider_spec(
fish_encounters[2,],
spec
)
#> # A tibble: 1 × 2#> fish Release#> <fct> <int>#> 1 4842 NA
I think this is just due to an error in the way wrap_vec() computes the slice indices