Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name assignemnt is more consistent #150

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marberts
Copy link

@marberts marberts commented Jan 1, 2024

https://bugs.r-project.org/show_bug.cgi?id=18558

Now

x <- 1:3
attr(x, "names") <- setNames(letters[1:3], x)
identical(names(x), letters[1:3])

is TRUE.

This also fixes the malformed factor error with

names(structure(1:3, names = factor(1:3)))

and makes it so

names(x) <- as.Date("2017-01-01")
identical(names(x), names(structure(x, names = as.Date("2017-01-01"))))

is TRUE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant