In [1]:
library(dplyr)
library(ggplot2)
In [2]:
head(economics)
In [3]:
a <- ggplot(data = economics, aes(x = date, y = unemploy))
a <- a + geom_line()
a
In [4]:
a <- ggplot(data = economics, aes(x = date, y = unemploy))
a <- a + geom_line()
a <- a + geom_smooth(method = "loess")
a
In [ ]:
df <- data.frame(birth_state=c("Illinois", "Arizona", NA),
data_scientist=c("Kevin", "Matt", "Jonathan"))
In [ ]:
df
In [ ]:
df$birth_state == "Arizona"
In [ ]:
just_Arizona <- df[df$birth_state=="Arizona",]
In [ ]:
just_Arizona
In [ ]:
really_just_Arizona <- df[which(df$birth_state=="Arizona"),]
In [ ]:
really_just_Arizona
In [ ]: