-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplots.R
More file actions
33 lines (21 loc) · 1.04 KB
/
plots.R
File metadata and controls
33 lines (21 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
library(R.matlab)
df <- readMat("depmatfinal.mat")
print(df)
rm(df)
library(tidyverse)
csv <- read_csv("depmat.csv")
rm(csv)
att <- read_csv("supAttriton.csv", col_names = c("Supervisor", "Count"))
dept <- read_csv("deptAttriton.csv", col_names = c("Department", "Count"))
func <- read_csv("funcAttriton.csv", col_names = c("Function", "Count"))
ro <- read_csv("roAttriton.csv", col_names = c("Role", "Count"))
roDS1 <- read_csv("roDS1Attriton.csv", col_names = c("Role", "Count"))
text1 <- theme(axis.text = element_text(size = rel(0.75)),
axis.text.x = element_text(angle = 70, hjust = 1))
(p_att <- ggplot(att, aes(Supervisor, Count)) + geom_col() + text1)
text <- theme(axis.text = element_text(size = rel(0.8)),
axis.text.x = element_text(angle = 50, hjust = 1))
(p_dept <- ggplot(dept, aes(Department, Count)) + geom_col() + text)
(p_func <- ggplot(func, aes(Function, Count)) + geom_col() + text)
(p_ro <- ggplot(ro, aes(Role, Count)) + geom_col() + text)
(p_ro1 <- ggplot(roDS1, aes(Role, Count)) + geom_col() + text1)