I'm trying to create a column in my data in .dbf. I need to create a column in which 70% is 0 (or TRUE) and 30% is 1 (or FALSE), only at random.
How can I do this?
If you need for example 100 values, try this:
sample(c(0,1), size = 100, replace = TRUE, prob = c(0.7, 0.3))
1.4m articles
1.4m replys
5 comments
57.0k users