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

fix: Allow glue() and other classed characters for subassignment #1503

Merged
merged 4 commits into from
Feb 21, 2023

Conversation

krlmlr
Copy link
Member

@krlmlr krlmlr commented Feb 21, 2023

Closes #1150.

@krlmlr krlmlr requested a review from lionel- February 21, 2023 04:31
@krlmlr
Copy link
Member Author

krlmlr commented Feb 21, 2023

foo[factor(1:3)] <- 1 is no longer an error with this PR: https://github.com/tidyverse/tibble/pull/1503/files#diff-caf5dada413b690788033e17323628597af35340a06fe65b18f11b5e7c13ff4dL426 . Is this something that vec_as_subscript() should disallow?

Copy link
Member

@lionel- lionel- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

foo[factor(1:3)] <- 1 is no longer an error with this PR: https://github.com/tidyverse/tibble/pull/1503/files#diff-caf5dada413b690788033e17323628597af35340a06fe65b18f11b5e7c13ff4dL426 . Is this something that vec_as_subscript() should disallow?

It is treated as character because factor has a ptype2 method with character.

@krlmlr krlmlr merged commit 214bebf into main Feb 21, 2023
@krlmlr krlmlr deleted the b-1150-glue-subassign branch February 21, 2023 14:53
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Referencing columns with [ ] fails when column names are created from glue
2 participants