Ling 104, session 02: Quarto

Author
Affiliation

UC Santa Barbara & JLU Giessen

Published

01 Apr 2026 12-34-56

1 R Markdown / Quarto

This is an R Markdown / Quarto document. Markdown is a simple formatting syntax for authoring HTML, PDF, MS Word, and other kinds of documents. For more details on using R Markdown see https://rmarkdown.rstudio.com or, better even, https://quarto.org.

When you click the Knit/Render button, a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

summary(cars)
     speed           dist       
 Min.   : 4.0   Min.   :  2.00  
 1st Qu.:12.0   1st Qu.: 26.00  
 Median :15.0   Median : 36.00  
 Mean   :15.4   Mean   : 42.98  
 3rd Qu.:19.0   3rd Qu.: 56.00  
 Max.   :25.0   Max.   :120.00  

But you can also refer to code like this in running text: summary(cars). And if you begin the inline quote with an “r” followed by a space, R will execute it and display the result when the document is rendered: 2+4=6.

2 Including Plots

2.1 Heading 2: some plot

You can also embed plots, for example:

plot(pressure)

2.2 Heading 2: some other plot

You can also embed plots, for example:

plot(pressure, type="b", pch=16, col="blue"); grid()

3 Useful formatting tips/options

Here are some useful formatting tips/options. Bullet lists are done like this:

  • single asterisks italicize;
  • dual asterisks print in bold type;
  • tildes make text be subscript: optiona;
  • carets make text be superscript: R2;
    • this is an increased indent for the bullet list;
      • we can do several of those …

This is how you include a hyperlink: STG’s website.

4 Remember: always use this at the end

sessionInfo()
R version 4.5.2 Patched (2025-11-09 r88994 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26200)

Matrix products: default
  LAPACK version 3.12.1

locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

time zone: America/Los_Angeles
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  compiler  methods  
[8] base     

other attached packages:
[1] STGmisc_1.06   Rcpp_1.1.1     magrittr_2.0.4

loaded via a namespace (and not attached):
 [1] digest_0.6.39     fastmap_1.2.0     xfun_0.57         knitr_1.51       
 [5] htmltools_0.5.9   rmarkdown_2.30    cli_3.6.5         rstudioapi_0.18.0
 [9] tools_4.5.2       evaluate_1.0.5    yaml_2.3.12       otel_0.2.0       
[13] htmlwidgets_1.6.4 rlang_1.1.7       jsonlite_2.0.0    MASS_7.3-65