ia_scale: A scale the sum or product of a vector to another value

Description Usage Arguments Value Examples

Description

A scale the sum or product of a vector to another value

Usage

1
ia_scale(input_array, target, method = "sum", reduce_target = FALSE)

Arguments

input_array

Vector of values to be scaled.

target

Desired result for the sum or product of the scaled result.

method

'sum' to scale the sum of the totals, or 'product'.

reduce_target

Logical. If target has more than one value, reduce it using the method

Value

An array of same length as input_array

Examples

1
2
3
ia_scale(1:5, 20)

ia_scale(1:5, 20, method = "product")

ryantimpe/ipfitr documentation built on May 14, 2019, 8:55 a.m.