Lecture 2
Dr. Elijah Meyer
Duke University
STA 199 - Spring 2023
January 18th, 2023
– Are you on Slack?
– Have you reserved a Duke container?
– Have you accepted your GitHub organization invite?
– Do you see ae-1 on GitHub? If so, clone it for class!
– Chat with me before or after class / send an email with your GitHub username if you do not see ae-01
– Slack postings
– Lab 0
– AE grading (Drop/Add ends - 25th)
– If you have not accepted your GitHub invitation, you can’t do this
– If you don’t see ae-01 in your org, work with the people around you
– Chat with me after class / send an email with your GitHub username if you do not see ae-01
Basics we will use throughout the semester
– R is a statistical programming language
– RStudio is a convenient interface for R
Please think through / write down what each line of code would produce.
Tip (and good practice): if you have questions about a function, use ?function.name to pull up the help page! If the help page is not helpful, look at their examples section and click Run Examples.
– Functions are (normally) verbs, followed by what they will be applied to in parentheses:
– Packages are installed with the install.packages function and loaded with the library function, once per session:
library(tidyverse)
library(tidyverse)
– The tidyverse is a collection of R packages designed for data science.
– All packages share an underlying philosophy and a common grammar.
– an open-source scientific and technical publishing system
– publish high-quality articles, reports, presentations, websites, blogs, and books in HTML, PDF, MS Word, ePub, and more
– Code goes in chunks, defined by three backticks, narrative goes outside of chunks
– Every assignment / lab / project will be given to you as a Quarto document
– You will always have a Quarto template document to start with
– As we get more familiar with R, the more code you will construct on your own
– What is version control? Why is it important?
– What is R vs RStudio?
– What is Quarto?