I recently got a new computer so I installed R and R studio to my computer. I believe I chose to install the Berkley R 3.53 package. (maybe that helps)
The code I ran was the following:
library(tidyverse)
library(ggmap)
library(ggplot)
college <- read_csv('http://672258.youcanlearnit.net/college.csv')
college <- college %>%
mutate(state=as.factor(state), region=as.factor(region),
highest_degree=as.factor(highest_degree),
control=as.factor(control), gender=as.factor(gender),
loan_default_rate=as.numeric(loan_default_rate))
states <- map_data("state")
states
Why am I not getting a graph? The graph I should be getting is in the "plot" box in R in the following link: https://imgur.com/FXg58g1
You are not getting a plot because in the code you are showing you are plotting nothing, you have missed the last part.
library(tidyverse)
library(ggmap)
college <- read_csv('http://672258.youcanlearnit.net/college.csv')
college <- college %>%
mutate(state=as.factor(state), region=as.factor(region),
highest_degree=as.factor(highest_degree),
control=as.factor(control), gender=as.factor(gender),
loan_default_rate=as.numeric(loan_default_rate))
states <- map_data("state")
# You are missing this part
ggplot(states) +
geom_polygon(aes(x = long, y = lat, group = group), color = "grey", fill = "beige") +
coord_map() +
theme(plot.background = element_blank(),
panel.background = element_blank(),
axis.title = element_blank(),
axis.ticks = element_blank(),
axis.text = element_blank())