salary <- read.csv("../00_data/Salaries.csv")
ggplot(data = salary) +
geom_bar(mapping = aes(x = rank))
ggplot(data = salary) +
geom_bar(mapping = aes(x = rank))
salary %>% count(rank)
## rank n
## 1 AssocProf 64
## 2 AsstProf 67
## 3 Prof 266
ggplot(data = salary) +
geom_histogram(mapping = aes(x = salary))
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
ggplot(data = salary, mapping = aes(x = salary, color = rank)) +
geom_freqpoly()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
salary %>%
ggplot(aes(x = salary)) +
geom_histogram(binwidth =)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
salary %>%
ggplot(aes(x = salary)) +
geom_histogram(binwidth =)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
salary %>%
ggplot(aes(y = yrs.service)) +
geom_histogram() +
coord_cartesian(ylim = c(0, 45))
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
salary %>%
ggplot(aes(x = sex, y = salary)) +
geom_boxplot()
salary %>%
count(rank, sex) %>%
ggplot(aes(x = rank, y = sex, fill = n)) +
geom_tile()
library(hexbin)
salary %>%
ggplot(aes(x = yrs.since.phd, y = yrs.service)) +
geom_hex()
Need help with Patterns and models, missing values, and unusual values