resample: 'resample' Gives sample of from the elements of ”x” of the...

View source: R/misc_functions.R

resampleR Documentation

'resample' Gives sample of from the elements of `x` of the specified size. Both size and `x` has to be integers

Description

'resample' Gives sample of from the elements of `x` of the specified size. Both size and `x` has to be integers

Usage

resample(x, ...)

Arguments

x

A vector to be sampled

...

Eventual condition for the vectorisation

Value

Sample(s) from the `x` vector, according to eventual conditions provided

Examples

x <- 1:10
resample(x[x >  8]) # length 2
resample(x[x >  9]) # length 1
resample(x[x > 10]) # length 0

ChristK/CKutils documentation built on April 11, 2025, 10:11 p.m.