Learn R Programming

contextual (version 0.9.8.4)

sample_one_of: Sample one element from vector or list

Description

Takes one sample from a vector or list. Does not throw an error for zero length lists.

Usage

sample_one_of(x)

Arguments

x

A vector of one or more elements from which to choose

Value

One value, drawn from x.