reorder {gmgm}R Documentation

Reorder the variables and the mixture components of a Gaussian mixture model

Description

This function reorders the variables and the mixture components of a Gaussian mixture model.

Usage

reorder(gmm, var = NULL, comp = NULL)

Arguments

gmm

An object of class gmm.

var

A character vector containing the variables in the desired order. If variables are not specified, they are added after the ordered ones. If NULL (the default), the variables are not reordered.

comp

An integer vector containing the indexes of the mixture component in the desired order. If components are not specified, they are added after the ordered ones. If NULL (the default), the components are not reordered.

Value

The reordered gmm object.

Examples

data(gmm_body)
gmm_1 <- reorder(gmm_body, var = c("WAIST", "AGE", "FAT", "HEIGHT", "WEIGHT"),
                 comp = c(2, 1, 3))


[Package gmgm version 1.1.2 Index]