Hello Yihui,
I encountered a problem with the process of producing the PDF version of RMarkdown files. Before clicking on the Knit-to-pdf button, I already ran every chunk of code and every output was shown right under (see picture 1). After hitting the Knit-to-PDF button, the PDF file was successfully produced, but it only contains the code I wrote but did not contain any output of the code (see picture 2). So could you give me a hand and provide any suggestions to solve this problem? Thanks!


Hi @FrederickZhengHe,
Can you follow the issue guide please: https://yihui.org/issue/ ?
It would help us to have a reproducible example.
I don't think this is something related to tinytex - I believe this is something specific to skimr.
As you can see in the doc website (https://docs.ropensci.org/skimr), this package have some requirements on fonts, and may not work perfectly for PDF output (at least differently than for HTML). You should follow the advices there (look at the article about fonts).
If issue, you should ask a question on RStudio Community which have a broader audience, and for sure some people who may have tried already what you want.
It is possible it is an issue in skimr, but I don't see what could be done in tinytex.
Are you ok with that ?
And also, this simple example works ok (if you have the fonts installed - it is required for the histogram or sparkline to show)
title: "Test"
mainfont: DejaVu Sans
output:
pdf_document:
latex_engine: xelatex
{r}
library(skimr)
faithful %>%
skim()
````