UC Davis DataLab
Fall 2024
Instructors: Michele Tobias, Wesley Brooks
Maintainer: Nick Ulle <naulle@ucdavis.edu>
The reader for this workshop is here.
This 4-part workshop series provides an introduction to using the R programming language for reproducible data analysis and scientific computing. Topics include programming basics, how to work with tabular data, how to break down programming problems, and how to organize code for clarity and reproducibility.
After this workshop, learners will be able to load tabular data sets into R, compute simple summaries and visualizations, do common data-tidying tasks, write reusable functions, and identify where to go to learn more.
No prior programming experience is necessary. All learners will need access to an internet-connected computer and the latest version of Zoom, R, and RStudio.
The workshop reader is written in Markdown and rendered with Quarto. To modify the reader:
-
If it's your first time contributing, start with Setup.
-
Talk to the reader's maintainer about your intended changes. The maintainer might ask you to consult existing issues, make pull requests, tag your commits with versions, etc.
-
Run
git pull
to make sure you have the latest changes. -
Edit an existing chapter file or create a new one. Chapter files are in the
chapters/
directory and are Quarto Markdown files (.qmd
). Chapter files should:- Follow the file naming scheme
##_title-of-chapter.qmd
(for numbered chapters) ortitle-of-chapter.qmd
(for unnumbered chapters). - Begin with a first-level header (like
# This
). This will be the title of your chapter. Subsequent section headers should be second-level headers (like## This
) or below.
Put any supporting resources in
data/
orimages/
. Store large files (> 1 MB), such as data sets, on Google Drive, Box, or other cloud storage rather than GitHub. - Follow the file naming scheme
-
Run
quarto render
to render the reader (the files indocs/
). This can be time-consuming; if you're not done editing and just want a quick preview, you can usequarto preview
instead. -
When you're finished editing, run
git add
on:- Any
.qmd
files you added or edited inchapters/
- Any image files you added or edited in
images/
- The entire
_freeze/
directory - Any other files you added or edited
Then run
git commit
to save the files andgit push
to upload them to GitHub. - Any
The reader is hosted by GitHub Pages as a live, public website. The files for
the website are stored in docs/
on branch main
. To update the website:
-
Run
quarto render
to render the reader (the files indocs/
). -
Run
git add docs/
, thengit commit
andgit push
.
Then the website will update automatically after a few minutes.
The reader is rendered with Quarto. Make sure it's installed before rendering the reader.
The reader might also depend on specific R packages. If the maintainer has
opted to use renv, open R in this repo and run renv::restore()
to install
them. If not, you'll have to use trial-and-error to determine which packages to
install.