1. Try compiling this document using the “Knit HTML” button. What files are produced?
  2. Edit the output to be “word_document” and recompile. What files are produced?
  3. Try running the chunk below by pressing the green play button on the far right. What happens?
x = seq(from  = 1, to = 20, by = .5)
x
##  [1]  1.0  1.5  2.0  2.5  3.0  3.5  4.0  4.5  5.0  5.5  6.0  6.5  7.0  7.5  8.0
## [16]  8.5  9.0  9.5 10.0 10.5 11.0 11.5 12.0 12.5 13.0 13.5 14.0 14.5 15.0 15.5
## [31] 16.0 16.5 17.0 17.5 18.0 18.5 19.0 19.5 20.0
plot(x)

This is a primary header. Add a secondary header with ## on the line below and recompile.

  1. Try pressing the run previous chunk button - the button that is to the left of the play button. What happens?
x = rnorm(100)
plot(x)

  1. Add a chunk option of fig.width = 10 to this plot, see what happens when you knit.
x = rnorm(10)
y = rnorm(10)
plot(x,y)

  1. Add a chunk option of echo=FALSE and see what happens when you knit.

  1. Check out the docs at: http://rmarkdown.rstudio.com/ and look under formats.

  2. Check out the output of this inline code when you knit the document: 60

  3. Install the devtools package by copy pasting install.packages(“devtools”) into your console. Then load the package using libray(devtools) and the command session_info() in this chunk and look at the output.

#install.packages("devtools")
library(devtools)
## Loading required package: usethis
session_info()
## ─ Session info ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
##  setting  value
##  version  R version 4.6.0 (2026-04-24)
##  os       macOS Sonoma 14.4.1
##  system   aarch64, darwin23
##  ui       X11
##  language (EN)
##  collate  en_US.UTF-8
##  ctype    en_US.UTF-8
##  tz       America/New_York
##  date     2026-07-20
##  pandoc   2.11 @ /Users/avahoffman/opt/anaconda3/bin/ (via rmarkdown)
##  quarto   1.8.25 @ /usr/local/bin/quarto
## 
## ─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
##  package     * version date (UTC) lib source
##  bslib         0.11.0  2026-05-16 [1] CRAN (R 4.6.0)
##  cachem        1.1.0   2024-05-16 [1] CRAN (R 4.6.0)
##  cli           3.6.6   2026-04-09 [1] CRAN (R 4.6.0)
##  devtools    * 2.5.2   2026-04-30 [1] CRAN (R 4.6.0)
##  digest        0.6.39  2025-11-19 [1] CRAN (R 4.6.0)
##  ellipsis      0.3.3   2026-04-04 [1] CRAN (R 4.6.0)
##  evaluate      1.0.5   2025-08-27 [1] CRAN (R 4.6.0)
##  fastmap       1.2.0   2024-05-15 [1] CRAN (R 4.6.0)
##  fs            2.1.0   2026-04-18 [1] CRAN (R 4.6.0)
##  glue          1.8.1   2026-04-17 [1] CRAN (R 4.6.0)
##  here          1.0.2   2025-09-15 [1] CRAN (R 4.6.0)
##  htmltools     0.5.9   2025-12-04 [1] CRAN (R 4.6.0)
##  jquerylib     0.1.4   2021-04-26 [1] CRAN (R 4.6.0)
##  jsonlite      2.0.0   2025-03-27 [1] CRAN (R 4.6.0)
##  knitr         1.51    2025-12-20 [1] CRAN (R 4.6.0)
##  lifecycle     1.0.5   2026-01-08 [1] CRAN (R 4.6.0)
##  magrittr      2.0.5   2026-04-04 [1] CRAN (R 4.6.0)
##  memoise       2.0.1   2021-11-26 [1] CRAN (R 4.6.0)
##  otel          0.2.0   2025-08-29 [1] CRAN (R 4.6.0)
##  pkgbuild      1.4.8   2025-05-26 [1] CRAN (R 4.6.0)
##  pkgload       1.5.2   2026-04-22 [1] CRAN (R 4.6.0)
##  purrr         1.2.2   2026-04-10 [1] CRAN (R 4.6.0)
##  R6            2.6.1   2025-02-15 [1] CRAN (R 4.6.0)
##  rlang         1.2.0   2026-04-06 [1] CRAN (R 4.6.0)
##  rmarkdown     2.31    2026-03-26 [1] CRAN (R 4.6.0)
##  rprojroot     2.1.1   2025-08-26 [1] CRAN (R 4.6.0)
##  sass          0.4.10  2025-04-11 [1] CRAN (R 4.6.0)
##  sessioninfo   1.2.4   2026-06-04 [1] CRAN (R 4.6.0)
##  usethis     * 3.2.1   2025-09-06 [1] CRAN (R 4.6.0)
##  vctrs         0.7.3   2026-04-11 [1] CRAN (R 4.6.0)
##  xfun          0.58    2026-06-01 [1] CRAN (R 4.6.0)
##  yaml          2.3.12  2025-12-10 [1] CRAN (R 4.6.0)
## 
##  [1] /Library/Frameworks/R.framework/Versions/4.6/Resources/library
##  * ── Packages attached to the search path.
## 
## ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────