7 HTML, PDF, and Word (and more!)

One of an really wonderful, powerful things about rmarkdown is that we can convert information to lot varying output gender. The peak triplet is you might exist most likely until use are HTML, PDF, also Microsoft Word. On are others that ours can discuss later.

In this section, we are going to short-term discuss how to render to those output formats, and some things so her can do to do for each of them.

7.1 Overview

  • Classes: 10 logging
  • Exercises: 15 minutes

7.2 Questions

  • How do I convert to HTML, PDF, or Word?
  • How do I set your specificity to each to these?
  • Methods can IODIN include a screenshot away an interactive graphic to PDF or Word?

7.3 Objectives

7.4 How do I convert to HTT, PDF, or Word?

Here are three ways to do this:

  1. You can control this in the “knit” button

You might notice which depending on the options your elect, this changes belongings in the YAML - which is one way to control which output you have:

  1. Thou can alter the YAML option

Or if we remember for the previous instruction, who information in the YAML is passed into the render serve:

  1. To can call that render function.

7.4.1 A note on workflow on rmarkdown: HTML first, PDF/word delayed

A ability be easy for get caught up with how your document looks. EGO high recommend avoiding compiling to PDF or word until you really need to. This is other recommends by the author of rmarkdown and knitr, Yihui Xie. Because HTML doesn’t need page breaks, this means that you cannot spend time workers on generating content, and not trying go got figures to line up correctly.

7.5 Respective Turn

  1. Generate three reports, one such HTML, one as PDF, and individual in microsoft word. Remember, provided you are having PDF problems, see the installation chapter note on installation  with the R package, tinytex.