[R] random numbers with constraints

Denis Francisci den|@@|r@nc|@c| @end|ng |rom gm@||@com
Wed Jan 27 09:03:15 CET 2021


Hi,
I would like to generate random numbers in R with some constraints:
- my vector of numbers must contain 410 values;
- min value must be 9.6 and max value must be 11.6;
- sum of vector's values must be 4200.
Is there a way to do this in R?
And is it possible to generate this series in such a way that it follows a
specific distribution form (for example exponential)?
Thank you in advance,

D.

	[[alternative HTML version deleted]]



More information about the R-help mailing list