5
How to select 100 size samples n = 10
, without replacement, using a population of N = 1000
?
My population:
set.seed(1234)
x <- rnorm(1000, mean = 100, sd = 20)
5
How to select 100 size samples n = 10
, without replacement, using a population of N = 1000
?
My population:
set.seed(1234)
x <- rnorm(1000, mean = 100, sd = 20)
6
You can use replicate + sample with replace false:
a <- replicate(100, sample(x = x, size = 10, replace = F))
The replicate will replicate the number of times you stipulate the function within it. In this case it will replicate 100 times the sample function.
Browser other questions tagged r
You are not signed in. Login or sign up in order to post.