resample(x, size, replace = TRUE, prob = NULL,
groups = NULL, orig.ids = FALSE, ...) deal(x, size, replace = FALSE, prob = NULL,
groups = NULL, orig.ids = FALSE)
shuffle(x, replace = FALSE, prob = NULL, groups = NULL,
orig.ids = FALSE)
sample(x, size, replace = FALSE, ...)
## S3 method for class 'default':
sample(x, size, replace = FALSE,
prob = NULL, groups = NULL, orig.ids = FALSE, ...)
## S3 method for class 'data.frame':
sample(x, size, replace = FALSE,
prob = NULL, groups = NULL, orig.ids = TRUE,
fixed = names(x), shuffled = c(),
invisibly.return = NULL, ...)
## S3 method for class 'matrix':
sample(x, size, replace = FALSE,
prob = NULL, groups = NULL, orig.ids = FALSE, ...)
## S3 method for class 'factor':
sample(x, size, replace = FALSE,
prob = NULL, groups = NULL, orig.ids = FALSE,
drop.unused.levels = FALSE, ...)
groups
in lattice plots)sample
sample
providing different defaults and natural names.# 100 Bernoulli trials -- no need for replace=TRUE
resample(c(0,1), 100)
deal(Cards, 13) # A Bridge hand
shuffle(Cards)
Run the code above in your browser using DataLab