Learn R Programming

mclust (version 1.1-7)

partconv: Convert partitioning into numerical vector.

Description

partconv converts a partitioning into a numerical vector. The second argument is used to force consecutive numbers (default) or not.

Usage

partconv(x, consec=T)

Arguments

x
Partitioning. Maybe numerical or not.
consec
Logical flag, whether or not to use consecutive class numbers.

Value

  • Vector of class numbers.

Examples

Run this code
data(iris)
partconv(iris[,5])

cl _ sample(1:10, 25, replace=T)
partconv(cl, consec=F)
partconv(cl, consec=T)

Run the code above in your browser using DataLab