Learn R Programming

sdbuildR (version 2.0.0)

rdist: Generate random number from custom distribution

Description

Equivalent of RandDist() in Insight Maker

Usage

rdist(a, b)

Value

One sample from custom distribution

Arguments

a

Vector to draw sample from

b

Vector of probabilities

Examples

Run this code
rdist(c(1, 2, 3), c(.5, .25, .25))

Run the code above in your browser using DataLab