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

plot_labelled output in codebook inconsistency #67

Open
franciscothebrady opened this issue May 10, 2021 · 0 comments
Open

plot_labelled output in codebook inconsistency #67

franciscothebrady opened this issue May 10, 2021 · 0 comments

Comments

@franciscothebrady
Copy link

Hello,
Thanks for this package. I'm having some difficulty with the way the plot_labelled is rendering plots interactively vs. within the codebook function. Hopefully I can include enough info below to be helpful. This is taken from our data and made generic, but I haven't changed any data types or results:

dput(survey$question)
structure(c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 0, NA, 
1, NA, NA, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 0, NA, NA, NA, 
NA, NA, 1, NA, NA, NA, NA, 1, NA, NA, 0, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, 0, NA, NA, NA, 1, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, 3, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, 1, 1, 1, NA, NA, 0, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 1, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, 0, NA, NA, NA, NA, NA, NA, 1, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, 0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 
NA, NA, NA, NA, NA, 0, NA, NA, NA, NA, NA, NA, NA, NA), label = "survey question", format.stata = "%12.0g", labels = c(Refused = -9, 
`Dont know` = -8), class = c("haven_labelled", "vctrs_vctr", 
"double"))

codebook::plot_labelled(survey$question) 

image

This looks correct, but when rendered in the codebook Rmd, something about the labels are interfering with the histogram.

image

I'm filing as an issue rather than just a question on SO because I'm not doing anything differently to the data before running the codebook function, thus the function or maybe how the codebook Rmd is interacting with it is inconsistent.

Thank you

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

1 participant