rescale_values: Re-scale Values

View source: R/rescale_values.R

rescale_valuesR Documentation

Re-scale Values

Description

Re-scale a group of designated columns so their sum equals sum_to

Usage

rescale_values(
  data_df = NULL,
  col_names = NULL,
  sum_to = 100,
  min_value = 80,
  max_value = 120
)

Arguments

data_df

input data.frame

col_names

character vector of columns that should sum to sum_to

sum_to

the value that the columns should sum to

min_perc

minimum sum of columns that should be re-scaled to sum_to

max_perc

maximum sum of columns that should be re-scaled to sum_to

Value

a tibble with corrected percentages that sum to 100

Author(s)

Kevin See and Mike Ackerman


mackerman44/DASH documentation built on Sept. 5, 2024, 8:14 a.m.