As an example, I created a dataset with 1 column numbered 1-10. I used the following SAS code:
proc surveyselect
data=sample
out=sample2
method=urs
n = 10
seed=1 outhits;
run;
This resulted in the following sample 5, 6, 7, 8, 9, 9, 9, 10, 10, 10. I ran the following code in R and got the following sample.
set.seed(1)
test <- 1:10
sample(test,size = 10, replace = TRUE)
3 4 6 10 3 9 10 7 7 1
For context, I am trying to replicate a bootstrapping analysis done in SAS in R, so it is important we get the same samples. Is there an easy way to generate the same sample in R?