Learn R Programming

PUGMM (version 0.1.2)

rand.member: Random partition of objects into classes

Description

Performs a random partition of objects into classes.

Usage

rand.member(n.obs, G)

Value

A binary and row-stochastic matrix with \(n.obs\) rows and \(G\) columns.

Arguments

n.obs

Number of objects

G

Number of classes

Details

No empty classes can occur.

Examples

Run this code
rand.member(10, 3)

Run the code above in your browser using DataLab