I would like to generate a random sample of size 80
whose elements are either 1
or 2
. I want 70%
1
and 30%
2
.
How can I do that in R?
Any help is appreciated.
Asked
Active
Viewed 233 times