SampleOne {TreeTools} | R Documentation |
Select element at random
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 |
Value
SampleOne()
returns a length one vector, randomly sampled from x
.
Author(s)
Martin R. Smith (martin.smith@durham.ac.uk)
See Also
Other utility functions:
ClusterTable
,
ClusterTable-methods
,
Hamming()
,
MSTEdges()
,
TipTimedTree()
,
UnshiftTree()
,
as.multiPhylo()
,
match,phylo,phylo-method
,
sapply64()
,
sort.multiPhylo()
Examples
SampleOne(9:10)
SampleOne(letters[1:4])
[Package TreeTools version 1.14.0 Index]