Lecture 2
NC State University
ST 511 - Fall 2024
2024-08-21
– Are on you Slack? (118 of you are as I make these slides)
– Can you access R + RStudio?
– Have you completed the Getting to know you survey?
Located on Moodle
Due Wedesday (today) at 11:59 pm
Quizzes can not be late
Free points + help me know you!
– Have you uploaded today’s activity to RStudio?
Try it before class starts
We will demo this again today
If you can not upload it, work with your neighboor and talk to me after class
Are each of these variables categorical or quantitative?
– Price of a home
– Zip code
– Student’s letter grade
Price of a home
Zip code
Student’s letter grade
What is an explanatory variable? What is a response variable?
Explanatory variable: Is the variable researchers manipulate or observe changes in that might influence or have an impact the response variable. THis is also called the independent variable
Response variable: This is the variable researchers are interested in. Also called the dependent variable,
What does reproducibility mean? Why is it important in research?
Reproducibility: Running the same analysis and getting to the same result.
“Quarto is an open-source software project that aims to make reproducible research and publications the norm.”
(Baker, 2016)
– 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
– Every AE, Hw, and take-home exam will be given to you as a Quarto document
– You will always have a Quarto template document to start with
– We will create HTML / PDF documents
Basics we will use throughout the semester
– 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 extensions of “base R” that contains code, functions, and data sets we can use!
– The tidyverse package is a collection of R packages.
|>
is called a pipe operator
This is used to emphasize a sequence of coding actions
“and then”
– We use Quarto for reproducibility
– We use R + RStudio for statistical analyses, data visualizations, and numerical summaries
– Functions are useful, and are pre-packaged code that help us operate on a dataset
– A code chunk argument is used to control rendered output in a document
– We can use the pipe |>
for a sequence of actions
– Join Slack
– Complete the quiz due tonight on Moodle
– Look out for prepare material for Monday
– Ask questions!