Learn R Programming

RprobitB (version 1.2.0)

sample_allocation: Sample allocation

Description

Sample allocation

Usage

sample_allocation(prob)

Value

An integer 1:C.

Arguments

prob

[numeric(C)]
The vector of class probabilities.

Examples

Run this code
sample_allocation(c(0.5, 0.3, 0.2))

Run the code above in your browser using DataLab