R/final_col_score.R

Defines functions final_col_score

Documented in final_col_score

#' Final COL Score
#'
#' Calculates the final col score proportion out of 5
#'
#' Should show up to 2 decimal places
#'
#' To be used in a mutate within the prep_scores call. INTERNAL FUNCTION FOR THIS PACKAGE
#'
#' @param .data
#'
#' @return
#' @export
#'
#' @examples
final_col_score = function(.data) {

  x <-
    ((.data$final_col_1a / 5) * 10) +
    .data$sv_COL_1B +
    .data$final_col_1c +
    .data$EquityAndAccess_2 +
    .data$RespectingDifferences_3 +
    ((.data$PositiveClassCulture_4A / 5) * 6) +
    ((.data$PositiveClassCulture_4B / 5) * 6) +
    ((.data$final_5 / 5) * 8) +
    ((.data$final_6a / 5) * 8) +
    ((.data$final_6b / 5) * 7) +
    .data$ResponsiveInstruction_7 +
    .data$CollabWithFamilies_8 +
    .data$CargiversTeachersAdvocates_9 +
    .data$final_10a +
    .data$final_10b +
    .data$QualifiedLeadership_11 +
    .data$OrgCultureCommunity_12

  y <- round((x / 100) * 5, digits = 2)

  return(y)

}
cpilat97/deceTools documentation built on May 12, 2022, 5:07 a.m.