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

add labels to varnames/values as in {labelled} and {haven} #394

Open
higgi13425 opened this issue Jul 25, 2020 · 4 comments
Open

add labels to varnames/values as in {labelled} and {haven} #394

higgi13425 opened this issue Jul 25, 2020 · 4 comments

Comments

@higgi13425
Copy link

higgi13425 commented Jul 25, 2020

Feature request

Recognize variable labels and value labels as in {haven}
haven packagedown site

and {labelled}
labelled packagedown site

packages when printing tabyls.

It would be cool.

@sfirke
Copy link
Owner

sfirke commented Jul 30, 2020

I like this idea and in fact I have a basic version that I use for tabyl-ing labelled vectors, back when that was a data type I encountered more: sfirke/tidysurvey#2 (comment)

How does that work for you? It is just a minimal example I used in my own work and hasn't received the thought it would need to be package-ready.

(I think the note to myself about "labels(dat) <- char_vec using papeR::labels" is about how I was labeling the data coming out of SurveyMonkey and won't be relevant if you already have labelled data?)

@sda030
Copy link

sda030 commented Jun 24, 2022

I strongly support recognizing {labelled} in tabyls. I am about to introduce tidyverse, janitor and more to many R-newbies who face a lot of survey data, but this limitation makes me reconsider tabyl... :(

@olivroy
Copy link
Contributor

olivroy commented May 15, 2024

@sfirke I could implement a PR for this.. Display labels in tabyl() if they exist.

New support for the label attribute was recently added in RStudio. gt does this, and ggplot2 seems to be going in this direction tidyverse/ggplot2#5879

@sfirke
Copy link
Owner

sfirke commented May 15, 2024

@olivroy that would be great. I will review such a PR. Let me know if you have design questions as you go, or questions about the backend code of tabyl.

@olivroy olivroy mentioned this issue May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants