Student-facing R package for MC-451 Research Methods at SIUE, built around the open textbook From Vibes to Variables: A Field Guide to Open Media Science.
# Install remotes if you don't have it
install.packages("remotes")
# Install coursepackR from GitHub
remotes::install_github("SIM-Lab-SIUE/coursepackR")Requires R >= 4.1. RStudio Desktop is recommended but not required.
library(coursepackR)
# 1. First-time setup (installs Quarto, TinyTeX, core packages)
mccourse_setup()
# 2. Verify your environment
mccourse_check()
# 3. Download this week's materials
download_week("mc451", 1)
# 4. Open the folder in your file browser
open_week(1)
# 5. Access the music dataset
data(unified_music)
head(unified_music)| Function | Description |
|---|---|
mccourse_setup() |
One-time environment setup — installs Quarto CLI, TinyTeX, and core R packages |
mccourse_check() |
Diagnostic check — verifies R version, RStudio, Quarto, Git, and templates |
mccourse_update() |
Check for and install package updates from GitHub |
download_week() |
Download a specific week's assignment template to your working directory |
download_journal() |
Download the reflective journal template for a given week |
open_week() |
Open a downloaded week's folder in your system file browser |
final_project() |
Scaffold a final project folder with Quarto document, bibliography, and data directory |
list_courses() |
List all available course IDs bundled in the package |
list_weeks() |
List all available weeks for a given course |
The unified_music dataset contains 1,792 songs with 36 variables from three sources:
- Billboard — chart rank, weeks on board, chart entry/exit dates
- Spotify — audio features (danceability, energy, valence, tempo, loudness, etc.)
- Genius — page views, lyrics, featured artists
data(unified_music)
dim(unified_music)
#> [1] 1792 36See the Unified Music Dataset vignette for the full variable reference and example analyses.
All 17 chapters of From Vibes to Variables are bundled for offline reading:
# Path to chapter 1
system.file("textbook", "chapter01.md", package = "coursepackR")Read the full book online at https://sim-lab-siue.github.io/vibes-to-variables/.
17 weeks of .qmd assignment templates for MC-451, aligned with textbook chapters:
list_weeks("mc451")
download_week("mc451", 1)Each week during the semester:
- Download this week's template:
download_week("mc451", 3)
- Open the folder:
open_week(3) - Work through the
.qmdfile in RStudio — read the chapter, answer prompts, run code - Render to HTML or PDF when finished (click Render in RStudio or
quarto render) - Reflect in your journal:
download_journal("mc451")
"Error in loadNamespace: there is no package called 'remotes'"
Run install.packages("remotes") first, then retry the install.
"package 'coursepackR' is not available for this version of R"
You need R >= 4.1. Check your version with R.version.string. Download the latest R from https://cran.r-project.org/.
mccourse_setup() says Quarto is not found
Download Quarto CLI from https://quarto.org/docs/get-started/. After installing, restart RStudio.
mccourse_check() shows a failing check
Run mccourse_setup() to install missing components, then re-check.
download_week() says the folder already exists
The function won't overwrite existing files. Delete or rename the old folder if you want a fresh copy.
coursepackR/
├── R/ # Package functions
├── man/ # Auto-generated help pages
├── data/ # unified_music.rda (lazy-loaded)
├── data-raw/ # Source CSV and preparation script
├── inst/
│ ├── textbook/ # 17 markdown chapters (offline access)
│ └── courses/mc451/
│ ├── weeks/ # Weekly .qmd templates (week_01–week_17)
│ └── journal/ # Journal template
├── vignettes/ # Long-form guides
├── tests/testthat/ # Unit tests
└── .github/workflows/ # CI/CD (R CMD check, pkgdown)
| Project | Description | Link |
|---|---|---|
| vibes-to-variables | Open textbook — From Vibes to Variables | Read Online | GitHub |
| liaison-program | Course support website with syllabus, setup guides, and resources | Visit Site | GitHub |
MIT