Untitled

require(mosaic)    # Load additional packages here 
require(ggformula) # formula interface to ggplot2

# Some customization.  You can alter or delete as desired (if you know what you are doing).

theme_set(theme_bw()) # change theme for ggplot2
trellis.par.set(theme=theme.mosaic()) # change default color scheme for lattice

knitr::opts_chunk$set(
  tidy=FALSE,     # display code as typed
  size="small")   # slightly smaller font for code

Using RMarkdown

Text

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

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.

gf_point(births ~ date, data = Births78)

R output

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

favstats(~ births, data = Births78)

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.

Documenting file creation

It's useful to record some information about how your file was created.

sessionInfo()  # could use devtools::session_info() if you prefer that


Try the ggformula package in your browser

Any scripts or data that you put into this service are public.

ggformula documentation built on Nov. 9, 2023, 5:08 p.m.