Ling 201, session 02: Quarto

Author
Affiliation

UC Santa Barbara & JLU Giessen

Published

14 Jan 2025 12-34-56

1 R Markdown / Quarto

This is an R Markdown / Quarto document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word 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)

A scatterplot of the exponential relationship between temperature and pressure

2.2 Heading 2: some other plot

You can also embed plots, for example:

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

A lineplot of the exponential relationship between temperature and pressure

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.6.1 (2026-06-24)
Platform: x86_64-pc-linux-gnu
Running under: Linux Mint 22.3

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3 
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3;  LAPACK version 3.11.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: America/Los_Angeles
tzcode source: system (glibc)

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

other attached packages:
[1] STGmisc_1.10   Rcpp_1.1.2     magrittr_2.0.5

loaded via a namespace (and not attached):
 [1] digest_0.6.39     Formula_1.2-6     fastmap_1.2.0     xfun_0.61        
 [5] abind_1.4-8       knitr_1.52        htmltools_0.5.9   rmarkdown_2.32   
 [9] cli_3.6.6         car_3.1-5         rstudioapi_0.19.0 tools_4.6.1      
[13] evaluate_1.0.5    carData_3.0-6     yaml_2.3.12       otel_0.2.0       
[17] htmlwidgets_1.6.4 jsonlite_2.0.0    rlang_1.3.0       MASS_7.3-66