Open higgi13425 opened 4 years ago
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: https://github.com/sfirke/tidysurvey/issues/2#issuecomment-463262151
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?)
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... :(
@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
@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
.
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.