randomValuesWithSum: Vector of random Integer Values of given Sum

View source: R/main.R

randomValuesWithSumR Documentation

Vector of random Integer Values of given Sum

Description

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


KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.