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(tidyverse)
library(collapse)
no_rows_tibble<-tibble::tibble(var_1=character(), var_2=numeric())
tmp<-no_rows_tibble|>collapse::fgroup_by(var_1) |>collapse::fsummarise(var_2= sum(var_2))
bind_rows(tmp, tmp)
#> Error in `vec_rbind()`:#> ! Unexpected `NULL`.#> ℹ In file 'slice.c' at line 322.#> ℹ This is an internal error that was detected in the vctrs package.#> Please report it at <https://github.com/r-lib/vctrs/issues> with a reprex (<https://tidyverse.org/help/>) and the full backtrace.
Thanks, this looks like a collapse bug to me. The generated NULL column is invalid as part of a data frame.
library(tidyverse)
library(collapse)
no_rows_tibble<-tibble::tibble(var_1=character(), var_2=numeric())
tmp<-no_rows_tibble|>collapse::fgroup_by(var_1) |>collapse::fsummarise(var_2= sum(var_2))
# Looks like a collapse bug. `var_2` should be `numeric()` not `NULL`.# This is an invalid data frame.
unclass(tmp)
#> $var_1#> character(0)#> #> $var_2#> NULL#> #> attr(,"row.names")#> integer(0)
Created on 2025-04-23 with reprex v2.1.1
The text was updated successfully, but these errors were encountered: