We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
filter()
glue
Here's a reprex:
library(labelled) library(glue) library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union test = tibble( a = 1 |> set_label_attribute("a1"), b = glue::glue("two") |> set_label_attribute("b2") ) test$b |> get_label_attribute() #> [1] "b2" # filter() strips the variable label from column `b` dplyr::filter(test)$b |> get_label_attribute() #> NULL # filter() doesn't strip the label from column `a` dplyr::filter(test)$a |> get_label_attribute() #> [1] "a1"
Created on 2025-01-28 with reprex v2.1.1
I expected column b to keep its label attribute. Not sure if this is ultimately an issue with dplyr, glue, or labelled, but seems like it's in dplyr?
b
dplyr
labelled
The text was updated successfully, but these errors were encountered:
(tested with dplyr 1.1.4.9000, glue 1.8.0, labelled 2.14.0, and R 4.4.2 on windows 11)
Sorry, something went wrong.
No branches or pull requests
Here's a reprex:
Created on 2025-01-28 with reprex v2.1.1
I expected column
b
to keep its label attribute. Not sure if this is ultimately an issue withdplyr
,glue
, orlabelled
, but seems like it's indplyr
?The text was updated successfully, but these errors were encountered: