readr::read_csv("dataset.csv")presentation.qmdCommon conventions include:
snake_case: words_separated_by_underscores
kebab-case: words-separated-by-hyphens
camelCase: wordsJoinedWithCapitals
PascalCase: WordsJoinedWithCapitals
Following tidyverse style we use snake_case for object names in R and kebab-case for file and folder names.
Use the ISO 8601 format (YYYY-MM-DD) for easy sorting.
Example: “meeting_notes_2026-04-16.md”
Use Enumeration and/or Letters for Easy Sorting
Example: lecture-01a-intro-toolkit.qmd, lecture-01b-intro-data.qmd
01 represents the weekof the quarter
a represents Monday b represents Wednesday
README file is the first file users read. In our case a user might be our future self, a teammate, or (if open source) anyone.
There can be multiple README files within a single directory: e.g. for the general project folder and then for a data subfolder. Data folder README’s can possibly contain codebook (data dictionary).
It should be brief but detailed enough to help user navigate.
a README should be up-to-date (can be updated throughout a project’s lifecycle as needed).
On GitHub we use markdown for README file (README.md). Good news: emojis are supported.
Importing data will depend on where the dataset is on your computer. However we use the help of here::here() function. This function sets the working directory to the project folder (i.e. where the .Rproj file is).
Open your lecture notes.
You will see that there are datasets that you should import.
data/README.md is a perfect place to document your data.
You should document where (URL) you downloaded the data from and when you downloaded it. The retrieval date is important as data can get updated.
Document the source of the data. For instance the data might be published by City of LA or a group of researchers at UC Irvine but it might be hosted by Kaggle. Cite the original source and where the data are hosted.
Document the codebook which shows what each variable represents.
If each change is made by one collaborator at a time, this would not be an efficient workflow.
1 - commit
2 - pull (very important)
3 - push
We can create an issue to keep a list of mistakes to be fixed, ideas to check with teammates, or note a to-do task. You can assign tasks to yourself or teammates.
If you are working on an issue, it makes sense to refer to issue number in your commit message (e.g. “add first draft of alternate texts for #4”). If your commit resolves the issue then you can use key words such as “fixes #4” or “closes #4” to close the issue. Issues can also be manually closed.
A .gitignore file contains the list of files which Git has been explicitly told to ignore.
For instance README.html can be git ignored.
You may consider git ignoring confidential files (e.g. some datasets) so that they would not be pushed by mistake to GitHub.
A file can be git ignored either by point-and-click using RStudio’s Git pane or by adding the file path to the .gitignore file. For instance weather.csv data file in a data folder need to be added as data/weather.csv
Files with certain files (e.g. all .log files) can also be ignored. See git ignore patterns.
It is also a good practice to save session information as package versions change, in order to be able to reproduce results from an analysis we need to know under what technical conditions the analysis was conducted.
R version 4.5.3 (2026-03-11)
Platform: aarch64-apple-darwin20
Running under: macOS Tahoe 26.4.1
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] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: America/Los_Angeles
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.5.3 fastmap_1.2.0 cli_3.6.6 tools_4.5.3
[5] htmltools_0.5.9 otel_0.2.0 rstudioapi_0.18.0 yaml_2.3.12
[9] rmarkdown_2.31 knitr_1.51 jsonlite_2.0.0 xfun_0.57
[13] digest_0.6.39 rlang_1.2.0 evaluate_1.0.5