sum_to: sum_to

Description Usage Arguments Value Examples

Description

Scale a vector so that it sums to some positive number

Usage

1
sum_to(vec, to = 100L)

Arguments

vec

A non-negative integer or numeric vector without NA

to

A positive number

Value

A vector that sums to 'to'

Examples

1
sum_to(c(1,2,3), 100)

talegari/sidekicks documentation built on May 30, 2019, 8:40 a.m.