From 6788e5ab8055da1879081a5efcb7b88cb3f28d9f Mon Sep 17 00:00:00 2001 From: C Morales <62895857+moralec@users.noreply.github.com> Date: Tue, 31 May 2022 10:06:09 +0100 Subject: [PATCH] Update external_dist.R --- R/external_dist.R | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/R/external_dist.R b/R/external_dist.R index e15dde2e..89659147 100644 --- a/R/external_dist.R +++ b/R/external_dist.R @@ -6,7 +6,7 @@ #' @title Distribution of Email Hours as a 100% stacked bar #' #' @description -#' Analyze External Collaboration Hours distribution. +#' Analyze the distribution of External Collaboration Hours. #' Returns a stacked bar plot by default. #' Additional options available to return a table with distribution elements. #' @@ -34,11 +34,13 @@ external_dist <- function(data, return = "plot", cut = c(5, 10, 15)) { - create_dist(data = data, - metric = "Collaboration_hours_external", +# Calculate Internal / External Collaboration time +plot_data <- data %>% mutate(External_collaboration_hours= Collaboration_hours_external) + +plot_data %>% create_dist(metric = "External_Collaboration_hours", hrvar = hrvar, mingroup = mingroup, return = return, cut = cut, - dist_colours = c("#124e42", "#218e77", "#7ee1cd", "#bef0e6")) + dist_colours = c("#3F7066", "#64B4A4", "#B1EDE1","#CBF3EB")) }