R/05-get_weight_column.R

Defines functions .get_weight_column

#' Get the column number for the weights
#'
#' @param wrp_geography_col numeric reflecting which regions have been selected
#'
#' @noRd

.get_weight_column <- function(wrp_geography_col) {
  ifelse(wrp_geography_col == 1, .pkgenv$wrp$wrp_weight_col,
         .pkgenv$wrp$wrp_projweight_col)
}

Try the worldriskpollr package in your browser

Any scripts or data that you put into this service are public.

worldriskpollr documentation built on April 3, 2023, 5:41 p.m.