2026 DSS Bootcamp
The authors informed the journal that the merge of laboratory results and other survey data used in the paper resulted in an error regarding the identification codes. Results of the analyses were based on the data set in which this error occurred. Further analyses established the results reported in this manuscript and interpretation of the data are not correct.
Original conclusion: Lower levels of CSF IL-6 were associated with current depression and with future depression […].
Revised conclusion: Higher levels of CSF IL-6 and CSF IL-8 were associated with current depression […].
From the authors of Low Dose Lidocaine for Refractory Seizures in Preterm Neonates:
The article has been retracted at the request of the authors. After carefully re-examining the data presented in the article, they identified that data of two different hospitals got terribly mixed. The published results cannot be reproduced in accordance with scientific and clinical correctness.
The error was detected when the authors later used lidocaine for the same problem and did not get the same result, which led them to re-examine the original data.
Anil Potti was a rising star cancer researcher here at Duke in the School of Medicine. His lab’s research focused on precision oncology (genomic signatures that could be used to predict patient response to chemotherapy).
Work was published in high-profile journals and received significant funding and attention; clinical trials using some of these results were also conducted.
Early whistleblower complaints from a medical student were dismissed; the student was persuaded not to report their concerns to the funding agency
Extensive work by statisticians (Baggerly and Coombes) at MD Anderson Cancer Center showed strong evidence that data were fabricated, manipulated, and misrepresented.
Downfall (in part) was triggered by falsifications of Potti’s CV (claimed to have been a Rhodes Scholar)
Ultimately 11 papers were retracted
Shu, Mazar, Gino, Ariely, & Bazerman (2012), “Signing at the beginning makes ethics salient …” (PNAS) was an influential paper that claimed to have found that signing a declaration of honesty at the beginning of a survey reduced dishonest self-reports. It involved multiple independent studies and was widely cited.
The paper was retracted in 2021 due to concerns about data fabrication and manipulation in one of the studies.
Subsequently, additional issues were discovered in a different study by a different author within the same paper.
We need an environment where:
data, analysis, and results are tightly connected, or better yet, inseparable,
reproducibility is built in,
all procedures are human readable and understandable.
Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.
The practitioner of literate programming […] strives for a program that is comprehensible because its concepts have been introduced in an order that is best for human understanding, using a mixture of formal and informal methods that reinforce each other.
These ideas have been around for years!
Tools for putting them into practice have also been around.
They have never been as accessible as they are now.
Scriptability
R / Python / Julia
Literate Programming
RMarkdown / Quarto
Jupyter / Marimo
Version Control
Git / GitHub
Create a GitHub account (unless you already have one) on https://github.com/
One day you might want to show off your work, so choose a username you will be ok with disclosing to a future employer.
Some suggestions:
Incorporate your actual name.
Shorter is better than longer.
Be as unique as possible in as few characters as possible. In some settings GitHub auto-completes or suggests usernames.
Make it timeless. Don’t highlight your current university, employer, or place of residence.
Avoid words laden with special meaning in programming.
To get started as quickly as possible, the preferred method is to use DSS Workbench server(s).
To access Posit Workbench:
If you are having trouble accessing Posit Workbench see the next slide.
If you cannot access RStudio via the DSS servers:
Make sure you are not using a custom DNS server
1.1.1.1 or 8.8.8.8Use a Docker container from Duke OIT
Reserve a Container and find RStudio (statistics application with R Markdown and knitr support)Install R and RStudio (or Positron) locally on your computer
Simple formal system for tracking changes to a project over time
Time machine for your projects
Critical for collaboration
Learning curve can be a bit steep, but when you need it you REALLY need it
Distributed
Popular and Successful
Tracks any type of file
Branching
git is already installed on the server(s). In the terminal tab you can verify this by running:
## git version 2.55.0
## /usr/bin/git
Within R we can also use the usethis package to get a helpful summary of the current git configuration,
── Git global (user)
• Name: <unset>
• Email: <unset>
✖ Git user's name and email are not set.
ℹ Configure using `use_git_config(user.name = "<your name>", user.email = "<your email>")`.
• Global (user-level) gitignore file:
• Vaccinated: FALSE
ℹ See `usethis::git_vaccinate()` to learn more.
• Default Git protocol: "https"
• Default initial branch name: "main"
── GitHub user
• Default GitHub host: "https://github.com"
• Personal access token for "https://github.com": <unset>
☐ To create a personal access token, call usethis::create_github_token().
☐ To store a token for current and future use, call gitcreds::gitcreds_set().
ℹ Read more in the Managing Git(Hub) Credentials article.
── Active usethis project: "/home/vis/cr173" ──
ℹ Active project is not a Git repo.
The following will tell git who you are, and other common configuration tasks.
You will need to do this configuration once on each environment (home directory) you use git (e.g. the server(s), your laptop, the DCC).
This can also be done via the terminal with,
To verify you configured git correctly, run
── Git global (user)
• Name: "Colin Rundel"
• Email: "rundel@gmail.com"
• Global (user-level) gitignore file:
• Vaccinated: FALSE
ℹ See `usethis::git_vaccinate()` to learn more.
• Default Git protocol: "https"
• Default initial branch name: "main"
── GitHub user
• Default GitHub host: "https://github.com"
• Personal access token for "https://github.com": <unset>
☐ To create a personal access token, call usethis::create_github_token().
☐ To store a token for current and future use, call gitcreds::gitcreds_set().
ℹ Read more in the Managing Git(Hub) Credentials article.
── Active usethis project: "/home/vis/cr173" ──
ℹ Active project is not a Git repo.
You should see output similar to above with your details.
We will be authenticating with GitHub using SSH via public / private keys. We can create a new key pair (if necessary) by running the following in RStudio’s console:
## No SSH key found. Generate one now?
##
## 1: Yes
## 2: No
##
## Selection: 1
## Generating new RSA keyspair at: /home/guest/.ssh/id_rsa
## Your public key:
##
## ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/wH7pT3UXdOMJSX2wMaPVTyGnYkS8OPmcfjct6h8Q+44/9UG3sOibjjUCxIxVeCWAoYFB0rDI3/Ljf2EWozLlpeGzAe7xsg6A+MHtUObZnfzXSB/NnOhZymD2u8Nh+py07aojVdKAPBkRH3nHA+rljidc3gXZkqseetYEI1N79OQUshp2P+Qm6Vab4I5OCnfAwLFkR7Sw7J9hvZN1qUmM0DB0WTWSlNmPSMsASMe/6Nz30IRoBh35Z7tgF79rlIW385giCkEeD20Le9EOueGoTWarJWylE1RWnUyig2mZ9JK/rYTw4KBXacPhBwn+MgGC+r8xY5IEX78xkeXW9q2z #<<
##
## Please copy the line above to GitHub: https://github.com/settings/ssh/new
## Would you like to open a browser now?
##
## 1: Yes
## 2: No
##
## Selection: 1
In order to get started, you need to obtain today’s files from GitHub. The steps below will give you access.
Log in to GitHub
Navigate to https://github.com/dukestatsci/computing_bootcamp_2026
Fork the repository
Copy the link under the Code button to clone with SSH.
In Positron go to File > New Folder from Git
Paste the ssh URL, that you copied in step 4, in the box under Repository URL
You now should have all the files in the repository in a directory on the server or your own computer.
status - returns details about the current status of your git repository
add / rm - stage (or unstage) a local file with changes so that the changes will be saved when you commit.
restore - revert local changes that have not yet been committed
commit - save staged local changes
push - send local committed changes to a remote git instance
pull - collect committed changes from a remote git instance
We will now make sure that everything is working correctly by making changes to the README.md file in the repository.
Make a small change to README.md (e.g. add your name) and save the file.
Stage & commit that change using Positron’s git GUI
Push the changes to GitHub
Check that the changes are reflected on GitHub
Commit early, often, and with complete code.
Write clear and concise commit messages.
Test code before you commit.
Use branches.
Communicate with your team.
git’s Pro Git book, Chapters Getting Started and Git Basics will be most useful if you are new to git and GitHub
Git cheatsheet by Atlassian
GitHub’s interactive Skills courses
Free online course from Udacity
Happy Git with R by Jenny Bryan
Markdown is a lightweight markup language for creating HTML (and other formatted) documents.
Markup languages are designed to produce documents from human readable text (and annotations).
Some of you may be familiar with LaTeX. This is another (less human friendly) markup language for creating pdf documents.
Why markdown is great:
R Markdown:
---
title: "Untitled"
output: html_document
date: "2023-08-22"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
```{r cars}
summary(cars)
```
## Including Plots
You can also embed plots, for example:
```{r pressure, echo=FALSE}
plot(pressure)
```
Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.Quarto:
---
title: "Untitled"
format: html
---
## Quarto
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
## Running Code
When you click the **Render** button a document will be generated that includes both content and the output of embedded code. You can embed code like this:
```{r}
1 + 1
```
You can add options to executable code like this
```{r}
#| echo: false
2 * 2
```
The `echo: false` option disables the printing of code (only output is displayed).Something simple
Something fancy
Check out the official R Markdown book: R Markdown: The Definitive Guide by Yihui Xie, J. J. Allaire, and Garrett Grolemund
Check out bookdown: Authoring Books and Technical Documents with R Markdown by Yihui Xie.
Take a look at RPubs web published R Markdown documents.
Much of the syntax is shared with R Markdown - so previous resources are a good place to start
Tom Mock’s Intro to Quarto webinar
rstudio::conf(2022) workshops
posit::conf workshops
Packages are the fundamental units of reproducible R code. They include reusable R functions, the documentation that describes how to use them, and sample data.
In the following exercises we’ll use the tidyverse package.
ggplot2, tibble, tidyr, readr, purrr, dplyr, stringr, and forcats.This package is already installed for you on the servers. If needed, you can install it by running the following in the Console:
Your Quarto document and your Console do not share their global environments.
This is good for reproducibility, but can sometimes result in frustrating errors.
This also means any packages or data needed for your analysis need to be loaded in your Quarto document as well.
To get started,
open examples/unvotes.qmd,
try Rendering the entire document and examine the results.
try changing one or more of the selected countries, re-render the document and observe any changes.
commit and push your changes to GitHub
Remember to name your code chunks
Familiarize yourself with chunk options (https://yihui.org/knitr/options/)
#| syntax enables tab completion for chunk optionsLoad packages at the start of a document, generally the chunk after your setup chunk
Familiarize yourself with various output formats: Make slides with revealjs, pdfs, books, etc.