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.1
cat("Platform:", R.version$platform, "\n")
## Platform: x86_64-w64-mingw32

Completion checklist:

  • X R is installed (version 4.0 or later)

  • If older than 4.0, download from https://www.r-project.org/

  • X RStudio is installed and functional

    • Check: Help → About RStudio
    • Current version shown: RStudio 2025.05.1+513 “Mariposa Orchid” Release (ab7c1bc795c7dcff8f26215b832a3649a19fc16c, 2025-06-01) for windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2025.05.1+513 Chrome/132.0.6834.210 Electron/34.5.1 Safari/537.36, Quarto 1.6.42
  • X You can open and read this document in RStudio

  • X You successfully ran the R code above without errors

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

*Your answer: R Version: 4.5.1

Version info here... my R version 4.5.2


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
  })
}
## Warning: package 'tidyverse' was built under R version 4.5.2
## Warning: package 'tibble' was built under R version 4.5.2
## Warning: package 'tidyr' was built under R version 4.5.2
## Warning: package 'readr' was built under R version 4.5.2
## Warning: package 'purrr' was built under R version 4.5.2
## Warning: package 'dplyr' was built under R version 4.5.2
## Warning: package 'stringr' was built under R version 4.5.2
## Warning: package 'forcats' was built under R version 4.5.2
## Warning: package 'lubridate' was built under R version 4.5.2
## ── 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.0     ✔ tibble    3.3.1
## ✔ lubridate 1.9.4     ✔ tidyr     1.3.2
## ✔ purrr     1.2.1     
## ── 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
## Warning: package 'rmarkdown' was built under R version 4.5.2
## ✓ rmarkdown loaded successfully
## Warning: package 'knitr' was built under R version 4.5.2
## ✓ knitr loaded successfully
## ✓ ggplot2 loaded successfully
## ✓ dplyr loaded successfully
## Warning: package 'car' was built under R version 4.5.2
## Loading required package: carData
## Warning: package 'carData' was built under R version 4.5.2
## 
## Attaching package: 'car'
## 
## The following object is masked from 'package:dplyr':
## 
##     recode
## 
## The following object is masked from 'package:purrr':
## 
##     some
## ✓ car loaded successfully
## Warning: package 'lmtest' was built under R version 4.5.2
## Loading required package: zoo
## Warning: package 'zoo' was built under R version 4.5.2
## 
## Attaching package: 'zoo'
## 
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
## ✓ lmtest loaded successfully
## Warning: package 'sandwich' was built under R version 4.5.2
## ✓ sandwich loaded successfully
## Warning: package 'stargazer' was built under R version 4.5.2
## 
## Please cite as: 
## 
##  Hlavac, Marek (2022). stargazer: Well-Formatted Regression and Summary Statistics Tables.
##  R package version 5.2.3. https://CRAN.R-project.org/package=stargazer
## ✓ stargazer loaded successfully
## Warning: package 'broom' was built under R version 4.5.2
## ✓ 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")
}
## ✓ All packages loaded successfully!

Completion checklist:

  • X All 10 packages loaded without errors

    • If any failed, run the installation code in Appendix A and try again
  • X You restarted R after installing packages (Ctrl+Shift+F10 in RStudio)

  • X All packages loaded successfully on second attempt

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

*Your answer: Yes, initially when I ran the code, only ggplot2 was successful. I ended up running each package by itself using the code “install.packages(”package_name”)” which allowed me to load each package successfully. I then closed R and opedned it again and the packages were successfully loaded into R.

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")
## C:/Users/graci/OneDrive/Documents/UA GRAD SCHOOL/2nd Semester/EPI553
# 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 / exists
## ✓ scripts / exists
## ✓ outputs / exists
## ✓ figures / exists

Completion checklist:

  • X Working directory is set to your course project folder

    • Path: C:GRAD SCHOOL\2nd SemesterCode-Code Project
  • X R Project file (.Rproj) exists in your project directory

  • X Four folders exist: data/, scripts/, outputs/, figures/

    • Run this code if folders are missing:
    dir.create("data")
    dir.create("scripts")
    dir.create("outputs")
    dir.create("figures")
  • X You can navigate between these folders in RStudio’s Files pane

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

*Your answer: The structure of my path is based on location for this class on my computer and then a separte folder for R code where you can then find my R-code Project.

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

Your path: C:\Users\graci\OneDrive\Documents\UA GRAD SCHOOL\2nd Semester\EPI553\R Code\R-Code Project


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:

  • X You can see the “Knit” button at the top of this document in RStudio

  • X You have successfully rendered an R Markdown file to HTML

    • Document rendered: ~/UA GRAD SCHOOL/2nd Semester/EPI%%#/ Setup_Workflow_Checklist–1-.html
    • Date/time rendered: 01/25/26 @11:25am
  • X The rendered HTML file opened automatically in the RStudio Viewer

  • X You can save the rendered HTML file to your outputs/ folder

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

*Your answer: To render the file I clicked on the knit button on the top of the screen in R. It then brought up a loading page in the console window and once it was finished loading it brought up another page where I could see the HTML file. I then went into my file expoler to confirm that the file saved in my outputs folder.

Answer here...


Section 5: File Management & Uploads

Objective: Practice saving files and uploading to Brightspace.

Completion checklist:

  • X You know where files are saved on your computer

    • Primary save location: C:GRAD SCHOOL\2nd Semester
  • X You can navigate to files using Windows Explorer or Finder

  • X You saved this document with a clear filename: LastName_FirstName_Setup_Checklist.Rmd

  • X You rendered it to HTML: LastName_FirstName_Setup_Checklist.html

  • X You can locate the rendered HTML file on your computer

    • Full file path: C:GRAD SCHOOL\2nd Semester
  • X You have logged into Brightspace and found the assignment submission area

  • X You know how to upload a file to Brightspace (done or ready to do)

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

*Your answer:Beal_Grace_Setup_Checklist.html

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:

  • X Data loaded successfully (mtcars)

  • X Summary statistics displayed without errors

  • X Plot rendered correctly showing relationship between weight and mpg

  • X Regression model ran successfully and displayed results

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:The model suggests that there is a negative relationship between the cars weight and fuel efficiency. The data shows that lighter cars have higher mpg, while heavier cars have lower mpg.

Answer here...


Final Completion Checklist

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

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

Submission Instructions

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

  1. Upload .Rmd file to Brightspace (for assignment completion)
  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 → 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 Ungrade submission Yes
RPubs Professional portfolio Strongly encouraged

You will submit: 1. Required: .Rmd 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! 🎓