partconv {mclust} | R Documentation

## 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=TRUE)

### Arguments

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

### Value

Vector of class numbers.

### Examples

    data(iris)
    partconv(iris[,5])

    cl <- sample(1:10, 25, replace=TRUE)
    partconv(cl, consec=FALSE)
    partconv(cl, consec=TRUE)

[Package Contents]