pq_data_small <- dplyr::slice_sample(pq_data, prop = 0.1)
# Plot mode 1 - show top and bottom five groups
create_rank(
data = pq_data_small,
hrvar = c("FunctionType", "LevelDesignation"),
metric = "Emails_sent",
return = "plot",
plot_mode = 1
)
# Plot mode 2 - show top and bottom groups per HR variable
create_rank(
data = pq_data_small,
hrvar = c("FunctionType", "LevelDesignation"),
metric = "Emails_sent",
return = "plot",
plot_mode = 2
)
# Return a table
create_rank(
data = pq_data_small,
metric = "Emails_sent",
return = "table"
)
# \donttest{
# Return a table - combination mode
create_rank(
data = pq_data_small,
metric = "Emails_sent",
mode = "combine",
return = "table"
)
# }
Run the code above in your browser using DataLab