Sampling with and without replacing

posted Sep 13, 2012, 6:00 PM by Unknown user
sample(x, size, replace = FALSE, prob = NULL)

By default, the sample command in R draws random numbers without replacement. Set replace= T to sample with replacement (as in the bagging example today). BTW, 'Bagging' is short for 'Bootstrap aggregation' in case you were wondering about this obscure naming convention.
Comments