randelt: Choose a random element from a list or vector

Description Usage Arguments Value

View source: R/list_utils.r

Description

Returns a unformly random chosen element of the vector or list x.

Usage

1
randelt(x, prob = NULL)

Arguments

x

The vector or list to chose an element from.

prob

A vector of probability weights for obtaining the elements of the vector or list being sampled.

Value

A uniformly random element of x.


rgp documentation built on May 30, 2017, 12:45 a.m.