Homer White’s Doc

Using RMarkdown

Text

Text can be decorated with bold or italics. It is also possible to

  • create links
  • include mathematics like \(e=mc^2\) or \[y = \beta_0 + \beta_1 x_1 + \beta_2 x_2\]

Be sure to put a space after the * when you are creating bullets and a space after # when creating section headers, but not between $ and the mathematical formulas.

Graphics

If the code of an R chunk produces a plot, this plot can be displayed in the resulting file.

xyplot(births ~ date, data=Births78)

R output

Other forms of R output are also displayed as they are produced.

favstats(~ births, data=Births78)
##   min   Q1 median   Q3   max     mean       sd   n missing
##  7135 8554   9218 9705 10711 9132.162 817.8821 365       0

Destination formats

This file can be knit to HTML, PDF, or Word. In RStudio, just select the desired output file type and click on Knit HTML, Knit PDF, or Knit Word. Use the dropdown menu next to that to change the desired file type.

My Plot

The plot below is from the CPS85 data frame in the mosaicData package. Guys are making more than gals, at pretty much every level of work experience.