resample: Resample

Description Usage Arguments

View source: R/resample_generic.R

Description

Resample

Usage

1
2
3
4
5
6
7
resample(x, ...)

## Default S3 method:
resample(x, ...)

## S3 method for class 'data.frame'
resample(x, ...)

Arguments

x

Object to resample

...

Arguments passed on to base::sample.int

n

a positive number, the number of items to choose from. See ‘Details.’

size

a non-negative integer giving the number of items to choose.

replace

should sampling be with replacement?

prob

a vector of probability weights for obtaining the elements of the vector being sampled.

useHash

logical indicating if the hash-version of the algorithm should be used. Can only be used for replace = FALSE, prob = NULL, and size <= n/2, and really should be used for large n, as useHash=FALSE will use memory proportional to n.


CGMossa/rbatteries documentation built on Oct. 30, 2019, 5:29 a.m.