Skip to content

factor() wrapper omits names in "fast" branch #343

Description

@MichaelChirico
x_short <- as.integer64(c(a = 1, b = 2))

names(factor(x_short))
# NULL
  
# c.f.
names(factor(c(a = 1L, b = 2L)))
# [1] "a" "b"
  
# and in the 'slow' branch too:
x_long  <- rep_len(x_short, 4000)
names(x_long) <- paste0("id", 1:4000)
head(names(factor(x_long)))
# [1] "id1" "id2" "id3" "id4" "id5" "id6"

Found while patching coverage for #342

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions