Skip to contents

Vector of random Integer Values of given Sum

Usage

randomValuesWithSum(n, sumOfValues, names = seq_len(n))

Arguments

n

number of values

sumOfValues

sum of values in the result vector

names

names of elements in the result vector. Default: seq_len(n)

Value

named vector of integer values with sum(values) == sumOfValues