library(readr)
library(ggplot2)
MERGED2014_15_PP <- read_csv("~/Desktop/R/Database Camp - Day 1/CollegeScorecard_Raw_Data/MERGED2014_15_PP.csv")
a1 = subset(MERGED2014_15_PP, STABBR == "AL")
a3 = geom_point(aes(color=factor(CITY)))
a8 = subset(a1, !(SATMTMID=="NULL"), !(SATVRMID=="NULL"))
a9 = ggplot(a8, aes(y = as.numeric(SATVRMID), x = as.numeric(SATMTMID), text = INSTNM, text2 = CITY))
a11 = geom_smooth(method = lm)
a12 = geom_text(aes(label=""))
a9 + a3 + a12 + a11
In the above code, when I attempt to run it no regression line appears. However, I also receive no errors. The data I am using is from the US Department of Education College Scorecard. What could be causing my error and how could I fix it? This code generated the below:
After cleaning up a8 to only include SATMTMID and SATVRMID, dput() returns the below:
structure(list(SATMTMID = c("420", "565", "590", "430", "565",
"509", "588", "560", "400", "490", "485", "558", "465", "528",
"484", "450", "558", "518", "538", "424", "465"), SATVRMID = c("424",
"570", "595", "425", "555", "486", "575", "560", "420", "510",
"495", "550", "470", "548", "506", "476", "565", "510", "535",
"448", "455")), .Names = c("SATMTMID", "SATVRMID"), row.names = c(NA,
-21L), class = c("tbl_df", "tbl", "data.frame"))