Lecture 2
NC State University
ST 295 - Spring 2025
2025-01-09
– Did you read the prepare material?
– Have you accepted your GitHub organization invite?
– Do you have access to this page?
> If so, please bookmark it! You will visit this page very often throughout the semester
We will start in-class activities (AEs) today. This will be the primary mode of learning throughout the semester. These will not be turned in for a grade. This means that they are entirely for you.
The weekly quizzes (starting next week) will be a check-in to see if you are completing the AEs
Use these activities to build yourself notes/resources to reference both during and after the semester!
Categorical or Quantitative (Numerical)?
– Height
– Weight
– Zip Code
– Coffee Drinker(Low, Med, High)
Categorical
> ordinal: category of data that can be ordered
> nominal: category of data with no inherent order
Quantitative
> discrete: takes on countable values
> continuous: takes on any value within a range (including decimals)
– Explanatory Variable
– Response Variable
From the text: When we suspect one variable might causally; predict; influence change in another we label the first variable the explanatory variable and the second the response variable
– Observational Study
– Experiment
Researchers perform an observational study when they collect data in a way that does not directly interfere with how the data arise.
In an experiment, we often manipulate; control; fix; administer the explanatory variable.
– Introduce R+RStudio, GitHub, and Quarto
– Understand why we are learning these tools
– Link together RStudio and GitHub
– Understand the file structure of a New Project in RStudio
– Introduce the flow of GitHub
– RStudio tour
– R is a statistical programming language
– RStudio is a convenient interface for R
– 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.
Often used interchangably, but it’s nice to know the difference…
Git is a version control system that intelligently tracks changes in files.
GitHub is a cloud-based platform where you can store, share, and work together with others to write code.
Think of this as email (Git) vs Gmail (GitHub)
GitHub allows you to create, store, change, merge, and collaborate on files or code. Any member of a team can access the GitHub repository and see the most recent version in real-time. Then, they can make edits or changes that the other collaborators also see.
GitHub also lets users make requests of one another and internally discuss the iterations along the way.
Today’s AE is located in the ae_sa
column in our schedule. You can find that here.
AEs will be located on GitHub once we get everything set up today.
– 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
To be able to compile PDFs, you will also need to download TinyTex. You can do so by running the following code in your Console.
install.packages('tinytex')
tinytex::install_tinytex()
– What is version control? Why is it important?
– What is R vs RStudio?
– What is a R package?