Lecture 8
Dr. Elijah Meyer + Konnie Huang
Duke University
STA 199 - Fall 2022
September 21, 2022
Open your ae-07
project in RStudio.
HW2 Due Tomorrow.
Exam 1 is coming (next week!)
– Regrade requests
– Be detailed
– Ask clarification questions in Slack
– Single pipeline
– Understand how R treats data
– ggplot practice
– Practice re-creating graphs
03:00
Categorical or quantitative?
– Zipcode
– Ounces of water drank
– Height of students (measured tall / short)
– Hours spent playing video games
– Type is how an object is stored in memory.
double: a real number stored in “double-precision floatint point format.”
integer: an integer (positive or negative).
– Class is metadata about the object that can determine how common functions operate on that object.
class()
- what kind of object is it (high-level)?
typeof()
- what is the object’s data type (low-level)?
Changing the type of a variable changes it’s class, and how functions oberate on the object. We will get practice with this in the application exercise.
ae-07
ae-07
(repo name will be suffixed with your GitHub name).– logical: a logical value.
– integer: an integer (positive or negative).
– double: a real number stored in “double-precision floatint point format.”
– character: a sequence of characters, called a “string” in other programming languages
More information can be found here: https://statsandr.com/blog/data-types-in-r/