Drop-in / Q&A
We asked learners to vote on the following topics for a mini-lesson for the last session before the show-and-tell session:
- working with dates and times in R
- working with strings and factors in R
- packaging complicated workflows (analyses that include multiple scripts, more than just R code, etc.)
- I would like the entire time for a question/answer session
They overwhelmingly chose #3
Targets
- Show slides from part 1 of previous targets workshop
- Demo repo (
targets
version on a branch): https://github.com/cct-datascience/targets-demo/tree/with-targets- Explore files
R/
_targets.R
- Demonstrate
tar_visnetwork()
,tar_make()
,tar_read()
- Investigate
_targets/
- Investigate
- Demonstrating invalidating a target by adding
species
to the model fit bylm()
in one of the functions infit_models.R
.- re-run
tar_visnetwork()
andtar_make()
- re-run
- Explore files
- Explore a medium complexity
targets
project on GitHub: https://github.com/ecohealthalliance/mpx-diagnosis- maybe try to reproduce it
- Mention that
targets
can be configured to work on UA HPC to run individual targets as SLURM jobs or multiple cores with Open on Demand.- Open on Demand example: https://github.com/cct-datascience/targets-uahpc
- Direct people to
targets
manual and discussions
Executing R code in the shell / shell code in R
Example of running R and Python scripts from bash:
Rscript 01-save_penguins.R bash 02-rename_penguins.sh python 03-print_penguins.py
Example of multi-lingual quarto doc
Citation
BibTeX citation:
@online{scott2023,
author = {Scott, Eric and Diaz, Renata and Guo, Jessica and Riemer,
Kristina},
title = {Drop-in / {Q\&A}},
date = {2023},
url = {https://cct-datascience.github.io/repro-data-sci//lessons/12-drop-in/notes.html},
doi = {10.5281/zenodo.8411612},
langid = {en}
}
For attribution, please cite this work as:
Scott, Eric, Renata Diaz, Jessica Guo, and Kristina Riemer. 2023.
“Drop-in / Q&A.” Reproducibility & Data Science in
R. 2023. https://doi.org/10.5281/zenodo.8411612.