#' combineWeightsAndNorms
#'
#' This function takes the normalised indicator scores and the weights derived from
#' factor analysis, multiplies them out and then takes the sum of these weighted
#' indicator scores to get the final score for that domain.
#' The function takes a list of weights (generated by \code{\link{getFAWeights}}) and a
#' data.frame of normalised scores, it returns a numeric vector containing the
#' combined domain score.
#'
#' @param weights a list of weights generated by \code{\link{getFAWeights}}
#' @param norms a data.frame of normalised indicator values generated by \code{\link{normalScores}}
#'
#' @keywords SIMD, openSIMD, simdr
#'
#' @export
combineWeightsAndNorms <- function(weights, norms) {
combined <- purrr::map2(weights, norms, ~ .x * .y)
combined %>% data.frame %>% rowSums
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.