-
Notifications
You must be signed in to change notification settings - Fork 14
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
The output of the knitr option "word_document" shows the name of the variable and not its assigned labels #324
Comments
I just realized that I would have to specify in the function "summary", argument "labbelTranslations", the name of the labels of each variable for it to appear in the word, even though by default each variable has a label assigned to it. That is to say, if I do not specify the value of the argument "labbelTranslations" in the output of the chunk of code, I still get the labels and not the original name of the variable. Is there any way to show the labels already assigned automatically? Output in RmarkdownOutput in Word document |
Without seeing your session, it's hard for me to tell what's going on. I'm wondering if your interactive objects aren't matching what gets produced by Rmarkdown when you knit in a new session. If that's the case, try restarting your R session, running every code chunk above this one, and then seeing what the output is in the knit_asis environment. |
When I run the chunk of code individually from Rmarkdown the output is a "knit_asis" type table that perfectly displays the table (including the labels for each variable). However, when I generate a word document using "knitr" the names shown in the table are those of the original variables (e.g. "age") and not the labels assigned to them (e.g. "Age in Years"). It seems that the problem is at the moment of generating the word document. I don't know if there is an option to show the labels and not the original variable name. Thank you.
Output in Rmarkdown
Output in Word
The text was updated successfully, but these errors were encountered: