FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

`setlevels()` doesn't handle missing or out-of-bounds factor values · Issue #7595 · Rdatatable/data.table · GitHub

setlevels() doesn't handle missing or out-of-bounds factor values #7595

Description

I'm aware this is not something you should be doing but I guess crashing is not the best way out.

setattr(factor(c(1:3), levels = c("1", "2")), "levels", c("1", "1"))

System info (where it consistently crashes R).

> version
               _
platform       x86_64-w64-mingw32
arch           x86_64
os             mingw32
crt            ucrt
system         x86_64, mingw32
status
major          4
minor          5.1
year           2025
month          06
day            13
svn rev        88306
language       R
version.string R version 4.5.1 (2025-06-13 ucrt)
nickname       Great Square Root

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL