# first install the swirl package
library(swirl)
swirl()
# Note: type bye() to exit swirlWeek 1
Intro to R/RStudio, Functions, Vectors, Data Types
Topics
- Part 0: Welcome
- Introduction to course & expectations (syllabus)
- Part 1:
- Intro to R & RStudio
- Handout with directions on installing R & RStudio
- Introduction to Quarto
- Functions, Vectors, Data Types
- Intro to R & RStudio
Announcements
- Class materials for BSTA 526 will be provided in the shared OneDrive folder BSTA_526_W26_class_materials_public.
- For today’s class, make sure to download to your computer the folder called
part1. Open RStudio by double-clicking on the project file calledBSTA_526_W26_class_materials_public.Rprojin the main OneDrive folder.
Class materials
| Part | OneDrive folder | Slides | Webpage |
|---|---|---|---|
| 0 | |||
| 1 |
Readings
Required
These readings are mostly supplemental and will help you if there are concepts that are unclear in class.
- R and RStudio Basics (Chapter 3) - make sure to watch the videos.
- Skip the following sections in Chapter 3:
- 3.3.1, 3.3.3,
- Skip the following sections in Chapter 3:
- Intro to R & Rstudio, and Quarto from Day 1 of my BSTA 511/611 class in Fall 2025 (slides version)
- Vectors and Data Frames (Section 3.3) from Data Science: A First Introduction by Timbers, Campbell, & Lee
- Workflow: scripts and projects from R for Data Science (2e) by Wickham, Cetinkaya-Rundel, & Grolemund
Optional
Posit/R Cheatsheets
- Many useful information and tips can be found in the list of cheatsheets on the Posit website
Markdown / Quarto
- Slides on how to do Markdown and other formatting in Quarto files. This is optional, but may be a helpful reference as you create your own Quarto files.
- Slides are from the OCTRI-BERD workshop on Creating Professional Presentations and Websites using R/Quarto presented by Jessica Minnier & myself in July 2025.
- There are also slides for Creating Presentations and Creating Websites using Quarto.
- Quarto’s website for Markdown Basics
Swirl Basics
This is a resource for learning basic R concepts using the R package swirl.
To start it, run the following code in the console in RStudio:
You’ll want to take a look at the R Programming course, especially the following sections:
- Basic Building Blocks
- Sequences of Numbers
- Vectors
- Missing values
Post-class survey
- Please fill out the post-class survey to provide feedback. Thank you!
- Previous muddiest points and clearest points with responses are collected here.
Homework
- See OneDrive folder for homework assignment.
- HW 1 due on 01/15.
Recording
- In-class recording links are on Sakai. Navigate to Course Materials -> Schedule with links to in-class recordings.