[R] generate random numbers subject to constraints

Ala' Jaouni ajaouni at gmail.com
Wed Mar 26 19:28:28 CET 2008


I am trying to generate a set of random numbers that fulfill the
following constraints:

X1 + X2 + X3 + X4 = 1

aX1 + bX2 + cX3 + dX4 = n

where a, b, c, d, and n are known.

Any function to do this?

Thanks,
-Ala'



More information about the R-help mailing list