Error
Error in `stop_native_implementation()`:
! `vec_ptype2.factor.factor()` is implemented at C level.
This R function is purely indicative and should never be called.
ℹ 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 and the full backtrace.
Run `rlang::last_trace()` to see where the error occurred.
Backtrace
Backtrace:
▆
1. └─dplyr::bind_rows(iris_1, iris_1)
2. └─vctrs::vec_rbind(!!!dots, .names_to = .id, .error_call = current_env())
3. └─vctrs (local) `<fn>`()
4. └─vctrs:::vec_ptype2.factor.factor(...)
5. └─vctrs:::stop_native_implementation("vec_ptype2.factor.factor")
6. └─cli::cli_abort(...)
7. └─rlang::abort(...)
REPREX
install.packages("renv")
renv::install("dplyr@1.1.4")
renv::install("vctrs@0.6.5")
# Produces the error
iris_1 <- iris
attr(iris_1$Species, "class") <- c("factor", "foo_factor")
dplyr::bind_rows(iris_1, iris_1)
# Doesn't produce the error
attr(iris_1$Species, "class") <- c("foo_factor", "factor")
dplyr::bind_rows(iris_1, iris_1)
Error
Backtrace
REPREX