Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

SampleOne

Quickly sample


Description

SampleOne() is a fast alternative to sample() that avoids some checks.

Usage

SampleOne(x, len = length(x))

Arguments

x

A vector to sample.

len

(Optional) Integer specifying length of x.

Value

SampleOne() returns a length one vector, randomly sampled from x.

Author(s)

Martin R. Smith (martin.smith@durham.ac.uk)

Examples

SampleOne(9:10)
SampleOne(letters[1:4])

TreeTools

Create, Modify and Analyse Phylogenetic Trees

v1.4.4
GPL (>= 3)
Authors
Martin R. Smith [aut, cre, cph] (<https://orcid.org/0000-0001-5660-1727>), Emmanuel Paradis [cph] (<https://orcid.org/0000-0003-3092-2199>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.