Hi there,

I guess this is an easy one, but still: 

I would like to randomly sample 0s and 1s but in a way that I end up having for example 70% of 1s and the rest of 0s and not 50:50 as this function does: sample(c(0,1), 100, replace = TRUE)

Any recommendations?


Many thanks!

Ana
	[[alternative HTML version deleted]]

