Skip to content

stop_native_implementation()/vec_ptype2.factor.factor() error #2054

@pbbgss

Description

@pbbgss

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("[email protected]")
renv::install("[email protected]")

# 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)

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