Instructions

This checklist confirms that you have completed all the technical setup required for EPI 553. This assignment is graded for completion only and should take 30-45 minutes to complete.

How to Use This Checklist: 1. Work through each section below 2. Mark items as complete as you verify them 3. Answer the reflection questions 4. Save this document with your name (e.g., LastName_FirstName_Setup_Checklist.Rmd) 5. Knit to HTML (Ctrl+Shift+K) 6. Upload the HTML file to Brightspace by January 29, 2026


Section 1: R & RStudio Installation

Objective: Verify that R and RStudio are installed and up-to-date.

# Run this code to check your R installation
cat("R Version:", paste(R.version$major, R.version$minor, sep="."), "\n")
## R Version: 4.5.2
cat("Platform:", R.version$platform, "\n")
## Platform: aarch64-apple-darwin20

Completion checklist:

    • Check: Help → About RStudio
    • Current version shown: _________________________

Reflection Question 1: What version of R and RStudio are you running? (Screenshot or write the versions below)

Your answer:

Version info here...


Section 2: Required Packages

Objective: Verify that all required packages are installed and load without errors.

# This code checks and loads required packages
required_packages <- c(
  "tidyverse", "rmarkdown", "knitr", "ggplot2", "dplyr", 
  "car", "lmtest", "sandwich", "stargazer", "broom"
)

cat("Loading required packages...\n\n")
## Loading required packages...
all_loaded <- TRUE
for (pkg in required_packages) {
  tryCatch({
    library(pkg, character.only = TRUE)
    cat("✓", pkg, "loaded successfully\n")
  }, error = function(e) {
    cat("✗", pkg, "FAILED to load\n")
    all_loaded <<- FALSE
  })
}
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.6
## ✔ forcats   1.0.1     ✔ stringr   1.6.0
## ✔ ggplot2   4.0.1     ✔ tibble    3.3.0
## ✔ lubridate 1.9.4     ✔ tidyr     1.3.2
## ✔ purrr     1.2.0     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
## ✓ tidyverse loaded successfully
## ✓ rmarkdown loaded successfully
## ✓ knitr loaded successfully
## ✓ ggplot2 loaded successfully
## ✓ dplyr loaded successfully
## Loading required package: carData
## 
## Attaching package: 'car'
## 
## The following object is masked from 'package:dplyr':
## 
##     recode
## 
## The following object is masked from 'package:purrr':
## 
##     some
## ✓ car loaded successfully
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## 
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
## ✓ lmtest loaded successfully
## ✓ sandwich loaded successfully
## ✗ stargazer FAILED to load
## ✓ broom loaded successfully
cat("\n")
if (all_loaded) {
  cat("✓ All packages loaded successfully!\n")
} else {
  cat("⚠ Some packages failed. Run the code in Appendix A to install them.\n")
}
## ⚠ Some packages failed. Run the code in Appendix A to install them.

Completion checklist:

    • If any failed, run the installation code in Appendix A and try again

Reflection Question 2: Did any packages fail to load initially? If yes, which ones and how did you resolve it?

Your answer:

Answer here...


Section 3: Working Directory & Project Structure

Objective: Set up your project directory with proper folder organization.

# Check current working directory
cat("Your current working directory:\n")
## Your current working directory:
cat(getwd(), "\n\n")
## /Users/mm992584/Library/CloudStorage/OneDrive-UniversityatAlbany-SUNY/Spring 2026/Epi 553/Week 1 R Setup Chunk
# Check for R Project file
if (file.exists(".Rproj")) {
  cat("✓ R Project file (.Rproj) detected\n")
} else {
  cat("⚠ No R Project file found\n")
  cat("   Create one: File → New Project → New Directory\n")
}
## ⚠ No R Project file found
##    Create one: File → New Project → New Directory
# Check for suggested folders
cat("\nFolder structure check:\n")
## 
## Folder structure check:
folders <- c("data", "scripts", "outputs", "figures")
for (folder in folders) {
  if (dir.exists(folder)) {
    cat("✓", folder, "/ exists\n")
  } else {
    cat("○", folder, "/ (needs to be created)\n")
  }
}
## ○ data / (needs to be created)
## ○ scripts / (needs to be created)
## ○ outputs / (needs to be created)
## ○ figures / (needs to be created)

Completion checklist:

    • Path: ________________________________________________
    • Run this code if folders are missing:
    dir.create("data")
    dir.create("scripts")
    dir.create("outputs")
    dir.create("figures")

Reflection Question 3: Describe your folder structure. What is the full path to your project directory?

Your answer:

Example: /Users/jsmith/Documents/Albany/EPI553

Your path:


Section 4: R Markdown & Rendering

Objective: Confirm you can create, edit, and render R Markdown documents.

# Verify R Markdown package
if (require("rmarkdown", quietly = TRUE)) {
  cat("✓ rmarkdown package is installed and loaded\n")
  cat("✓ You can render to HTML, PDF, and Word formats\n\n")
  cat("To render a document:\n")
  cat("1. Click the 'Knit' button (top of editor) or press Ctrl+Shift+K\n")
  cat("2. Select output format (HTML, PDF, Word)\n")
  cat("3. View the rendered document in RStudio Viewer\n")
} else {
  cat("✗ rmarkdown not found. Run: install.packages('rmarkdown')\n")
}
## ✓ rmarkdown package is installed and loaded
## ✓ You can render to HTML, PDF, and Word formats
## 
## To render a document:
## 1. Click the 'Knit' button (top of editor) or press Ctrl+Shift+K
## 2. Select output format (HTML, PDF, Word)
## 3. View the rendered document in RStudio Viewer

Completion checklist:

    • Document rendered: ____________________________________
    • Date/time rendered: ___________________________________

Reflection Question 4: Describe the process you followed to render this checklist to HTML. What did you click and what happened?

Your answer:

Answer here...


Section 5: File Management & Uploads

Objective: Practice saving files and uploading to Brightspace.

Completion checklist:

    • Primary save location: _____________________________
    • Full file path: ______________________________________

Reflection Question 5: What is the exact filename (including .html extension) of the rendered version of this document?

Your answer:

Example: Smith_John_Setup_Checklist.html

Your filename:


Section 6: Data & Code Practice

Objective: Verify you can work with data and run code in R.

Let’s do a quick practice analysis:

# Load data
library(tidyverse)

# Use built-in mtcars dataset
cat("Dataset: mtcars (Motor Trend Car Road Tests)\n")
## Dataset: mtcars (Motor Trend Car Road Tests)
cat("Sample of data:\n")
## Sample of data:
print(head(mtcars, 3))
##                mpg cyl disp  hp drat    wt  qsec vs am gear carb
## Mazda RX4     21.0   6  160 110 3.90 2.620 16.46  0  1    4    4
## Mazda RX4 Wag 21.0   6  160 110 3.90 2.875 17.02  0  1    4    4
## Datsun 710    22.8   4  108  93 3.85 2.320 18.61  1  1    4    1
cat("\n\nBasic Summary Statistics:\n")
## 
## 
## Basic Summary Statistics:
summary(mtcars$mpg)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   10.40   15.43   19.20   20.09   22.80   33.90

Create a simple visualization:

mtcars %>%
  ggplot(aes(x = wt, y = mpg, color = factor(cyl))) +
  geom_point(size = 3, alpha = 0.7) +
  geom_smooth(method = "lm", se = FALSE, alpha = 0.5) +
  labs(
    title = "Fuel Efficiency vs Weight",
    subtitle = "EPI 553 - Setup & Workflow Checklist",
    x = "Weight (1000 lbs)",
    y = "Miles Per Gallon (mpg)",
    color = "Cylinders"
  ) +
  theme_minimal() +
  theme(
    plot.title = element_text(size = 14, face = "bold"),
    legend.position = "bottom"
  )

Fit a regression model:

# Fit a simple linear regression model
model <- lm(mpg ~ wt + factor(cyl), data = mtcars)

cat("Linear Regression Model: mpg ~ weight + cylinders\n\n")
## Linear Regression Model: mpg ~ weight + cylinders
print(summary(model))
## 
## Call:
## lm(formula = mpg ~ wt + factor(cyl), data = mtcars)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.5890 -1.2357 -0.5159  1.3845  5.7915 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   33.9908     1.8878  18.006  < 2e-16 ***
## wt            -3.2056     0.7539  -4.252 0.000213 ***
## factor(cyl)6  -4.2556     1.3861  -3.070 0.004718 ** 
## factor(cyl)8  -6.0709     1.6523  -3.674 0.000999 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.557 on 28 degrees of freedom
## Multiple R-squared:  0.8374, Adjusted R-squared:   0.82 
## F-statistic: 48.08 on 3 and 28 DF,  p-value: 3.594e-11
# Extract key results
cat("\n\nKey Results:\n")
## 
## 
## Key Results:
cat("R-squared:", round(summary(model)$r.squared, 4), "\n")
## R-squared: 0.8374
cat("Residual Std. Error:", round(summary(model)$sigma, 4), "\n")
## Residual Std. Error: 2.5569

Completion checklist:

Reflection Question 6: Looking at the plot above, describe the relationship between vehicle weight (x-axis) and fuel efficiency (y-axis). What does the model suggest?

Your answer:

Answer here...


Final Completion Checklist

Use this final checklist to confirm you’ve completed everything:

Item Status Notes
✓ Completed all 6 sections above
✓ Answered all 6 reflection questions
✓ Successfully rendered this document to HTML
✓ Saved rendered HTML with correct filename
✓ Ready to upload to Brightspace

Submission Instructions

For this course, you will submit your work in two ways:

  1. Upload to Brightspace (for grading)
  2. Publish to RPubs (for portfolio & reproducibility)

Option A: Upload to Brightspace

Save, Render, and Submit:

  1. Save this document with your name: LastName_FirstName_Setup_Checklist.Rmd

  2. Render to HTML by clicking “Knit” (Ctrl+Shift+K)

    • Output file: LastName_FirstName_Setup_Checklist.html
  3. Upload to Brightspace:

    • Go to: EPI 553 → Assignments → Week 1 Setup & Workflow Checklist
    • Click “Submit Assignment”
    • Upload the HTML file
    • Add any additional notes if needed
    • Click “Submit”

Deadline: January 29, 2026


Summary: Both Submissions

Method Purpose Required?
Brightspace Grade submission Yes
RPubs Professional portfolio Strongly encouraged

You will submit: 1. Required: HTML file to Brightspace 2. Optional but recommended: RPubs link to Brightspace comments


Troubleshooting

R & RStudio Issues

Quick Issues:

  • “Cannot find package X”
    • Run: install.packages("package_name")
    • Make sure you’re connected to the internet
  • “Object not found”
    • Make sure you ran all code chunks above in order
    • Try running code manually in the console
  • Plot doesn’t show
    • Check that ggplot2 loaded correctly
    • Verify all required packages are installed
  • Knit button missing
    • Make sure this is a .Rmd file, not .R
    • Click in the document first, then look for Knit button
  • Firewall blocking package downloads
    • Connect to UAlbany WiFi or use VPN
    • Try installing with: install.packages(pkg, type = "source")

RPubs Publishing Issues

Common Problems:

  • “Publish button is greyed out”
    • Make sure output format is html_document
    • Check YAML header has correct formatting
    • Try rendering again (Ctrl+Shift+K)
  • “Cannot connect to RPubs”
    • Check your internet connection
    • Re-authorize: Tools → Global Options → Publishing → Connect
    • Clear RStudio cache if persistent
  • “Publishing failed” error
    • Check document size (should be under 25MB)
    • Ensure no broken links in your code or text
    • Try publishing again in a few minutes
    • Check that your username contains no spaces
  • “Already published to this slug”
    • Use a different slug/URL name
    • Or republish to update existing document

Still Having Trouble?

For R/RStudio Help: - UAlbany IT Help Desk: 518-442-3700 or - Office hours with Dr. Masum or Yiming Wang

For RPubs Help: - RPubs documentation: https://rpubs.com/about/getting-started - RStudio publishing guide: https://posit.co/blog/r-markdown-and-rpubs/

For Course Content Questions:

Instructor (Dr. Muntasir Masum): - Email: - Office: Pine Bush 255 - Office Hours: Tuesdays & Thursdays, 10:20 am - 11:30 am

Teaching Assistant (Yiming Wang): - Email: - Office Hours: Mondays & Wednesdays, 11:30 am - 4:30 pm

Please reach out by January 27 if you have persistent issues!


Appendix A: Installing Packages (If Needed)

If packages failed to load in Section 2, run this code:

# Install all required packages
required_packages <- c(
  "tidyverse", "rmarkdown", "knitr", "ggplot2", "dplyr", 
  "car", "lmtest", "sandwich", "stargazer", "broom"
)

# Install each package
for (pkg in required_packages) {
  if (!require(pkg, character.only = TRUE)) {
    cat("Installing", pkg, "...\n")
    install.packages(pkg, dependencies = TRUE)
  }
}

cat("\n✓ Installation complete!\n")
cat("Now restart R: Ctrl+Shift+F10\n")
cat("Then reload this document and try Section 2 again.\n")

Appendix B: Creating Folders (If Needed)

If you need to create the folder structure, run this code in the R Console:

# Create folders if they don't exist
if (!dir.exists("data")) {
  dir.create("data")
  cat("✓ Created data/ folder\n")
}

if (!dir.exists("scripts")) {
  dir.create("scripts")
  cat("✓ Created scripts/ folder\n")
}

if (!dir.exists("outputs")) {
  dir.create("outputs")
  cat("✓ Created outputs/ folder\n")
}

if (!dir.exists("figures")) {
  dir.create("figures")
  cat("✓ Created figures/ folder\n")
}

cat("\nAll folders created successfully!\n")

Successfully completing this checklist means you are ready for Week 1 of EPI 553!

For questions or concerns, reach out to Dr. Masum or Yiming Wang.

Good luck! 🎓