Rstudio knit to PDF

前端 未结 2 1249
南笙
南笙 2021-01-12 11:40

The new version of Rstudio (0.98.932) has many new options including knit to PDF. An article describing the new version has a comment from Dave that says:

相关标签:
2条回答
  • 2021-01-12 12:16

    Adding on @nicholas response This is also why I create new .Rmd documents through the RStudio gui

    File > New File > R markdown.

    This way the YAML header is populated correctly.

    0 讨论(0)
  • 2021-01-12 12:25

    I have just installed the new version of RStudio (0.98.932), which prompted me to upgrade a couple of packages (I can't remember which, although I see I have knitr 1.6, markdown 0.7 and rmarkdown 0.2.46). At first I had the same problem; there was only a single 'knit' option on the tool bar. I managed to get the ability to knit to .pdf by adding the following to the head of my .Rmd file.

    ---
    title: "Sample Document"
    output: pdf_document
    ---
    

    Having done that, I now find I do have a drop down menu with options to knit to HTML, PDF and word. There's also a little gear icon that provides access to the R Markdown document options that wasn't there before. I have no idea what the problem was but it seems OK now!

    0 讨论(0)
提交回复
热议问题