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:
quarto
and rUM
? (Add a “quart
o’ rUM
”!)Modern version RStudio (v2022.07 or later) ships with Quarto but you can install the latest version of Quarto from here.
Add rUM
to your computer by:
Use rUM
by running this in the console of
RStudio:
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).
Navigate to File > New Project > Existing Directory
Specify the location of where your research project will be saved
Run the following script in your console:
rUM
?)A new project directory is created and it will be populated with these files:
.gitignore
to help prevent the unintended
sharing of sensitive study information or protected health information
(PHI).analysis.qmd
is
a Quarto template for writing your research project. It has a
preconfigured YAML header; Introduction, Methods, Results, Conclusion,
and Reference sections; and a code chunk to construct your bibliography
using knitr::write_bib()
.data
. This folder is listed
within the .gitignore
. That means that git should not track
these files. This should help prevent data leakage but be sure to talk
to a data security expert before sharing any biomedical projects on
websites like GitHub..Rproj
file with the same name as your project
folder.packages.bib
and
references.bib
, which are used to hold details for your
paper’s bibliography. Refer to the Methods and References sections,
respectively, within the analysis.qmd
file for
initial examples of how to add/use references.the-new-england-journal-of-medicine.csl
is the citation style language (CSL) based on the New England
Journal of Medicine requirements.Newly created files:
analysis.qmd
:
If you are new to R, ignore this.
sessionInfo()
#> R version 4.4.1 (2024-06-14)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 24.04.1 LTS
#>
#> Matrix products: default
#> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C
#> [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: Etc/UTC
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] rmarkdown_2.28
#>
#> loaded via a namespace (and not attached):
#> [1] digest_0.6.37 R6_2.5.1 fastmap_1.2.0 xfun_0.48
#> [5] maketools_1.3.1 cachem_1.1.0 knitr_1.48 htmltools_0.5.8.1
#> [9] buildtools_1.0.0 lifecycle_1.0.4 cli_3.6.3 sass_0.4.9
#> [13] jquerylib_0.1.4 compiler_4.4.1 sys_3.4.3 tools_4.4.1
#> [17] evaluate_1.0.1 bslib_0.8.0 yaml_2.3.10 jsonlite_1.8.9
#> [21] rlang_1.1.4