S <- complete_rs(N = 100)
table(S)
S <- complete_rs(N = 100, n = 50)
table(S)
S <- complete_rs(N = 100, n_unit = rep(50, 100))
table(S)
S <- complete_rs(N = 100, prob = .111)
table(S)
S <- complete_rs(N = 100, prob_unit = rep(.1, 100))
table(S)
# If N = n, sample with 100% probability...
complete_rs(N=2, n=2)
# Up through randomizr 0.12.0,
# This behavior has been deprecated
complete_rs(N=1, n=1) # sampled with 50% probability
Run the code above in your browser using DataLab