2. Create a Research Project with Quarto and rUM (original) (raw)

Introduction

This is a collection of document templates, available through R, from your friends at the University of Miami (UM). \(R+UM=rUM\)

The rUM package will help you create research manuscripts by removing the configuration hassles commonly encountered when learning to write papers using R. rUM will initialize a new RStudio project and a Quarto file that includes the outline for a research paper. The Quarto file comes preconfigured with a YAML header (don’t worry if you don’t know what that means yet) with code chunks to load the tidyverse and conflicted packages. Manuscript sections have been created for Introduction, Methods, Results, Conclusion, and References. The project also includes a.gitignore file which is designed to help protect against accidentally leaking data when using git with websites like www.github.com.

rUM’s documentation can be found here:

How do I get quarto and rUM? (Add a “quart o’ rUM”!)

  1. Modern version RStudio (v2022.07 or later) ships with Quarto but you can install the latest version of Quarto from here.
  2. Add rUM to your computer by:
    • using RStudio: click on the Packages tab in the bottom right windowpane, click the Install button, type**rUM**, and click Install.
    • downloading rUM from CRAN and installing it by running this code in R console:
    • downloading the latest version of rUM from GitHub by running commands into the R console:
if (!requireNamespace("remotes")) install.packages("remotes")  
remotes::install_github("RaymondBalise/rUM")  
  1. Use rUM by running this in the console of RStudio:

Add rUM into an existing folder/directory that does not have an RStudio project.

What if you have already created a folder containing the important files for your project? Create a new project in your existing folder! This will now be your project directory (complete with a.Rproj file).

  1. Navigate to File > New Project > Existing Directory
  2. Specify the location of where your research project will be saved
    Existing project working directory window in RStudio
  3. Run the following script in your console:
# Change the text inside the quotes on the next line to indicate the path to your folder/directory.
PATH <- "~/Documents/blah"   

make_project(PATH, type = "Quarto (analysis.qmd)")

What is in the project? (What is served with yourrUM?)

A new project directory is created and it will be populated with these files:

Newly created files:

Display of newly created rUM project files in the RStudio Files pane

analysis.qmd:

Screenshot of analysis.qmd template structure using the visual editor layout

Session

If you are new to R, ignore this.

sessionInfo()
#> R version 4.5.0 (2025-04-11)
#> Platform: aarch64-apple-darwin20
#> Running under: macOS Sequoia 15.5
#> 
#> Matrix products: default
#> BLAS:   /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRblas.0.dylib 
#> LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.1
#> 
#> locale:
#> [1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#> 
#> time zone: America/New_York
#> tzcode source: internal
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] digest_0.6.37     R6_2.6.1          fastmap_1.2.0     xfun_0.52        
#>  [5] cachem_1.1.0      knitr_1.50        htmltools_0.5.8.1 rmarkdown_2.29   
#>  [9] lifecycle_1.0.4   cli_3.6.5         sass_0.4.10       jquerylib_0.1.4  
#> [13] compiler_4.5.0    rstudioapi_0.17.1 tools_4.5.0       evaluate_1.0.4   
#> [17] bslib_0.9.0       yaml_2.3.10       rlang_1.1.6       jsonlite_2.0.0