ClusterCreateClassification: Create Classification for Cluster.. functions

View source: R/ClusterCreateClassification.R

ClusterCreateClassificationR Documentation

Create Classification for Cluster.. functions

Description

Creates a Cls from arbitrary list of objects

Usage

ClusterCreateClassification(Objects,Decreasing)

Arguments

Objects

Listed objects, for example factor

Decreasing

Boolean that can be missing. If given, sorts ClusterNames with either decreasing or increasing.

Details

ClusterNames can be sorted before the classification stored Cls is created. See example.

Value

LIST, with

Cls

[1:n] numerical vector with n numbers defining the labels of the classification. It has 1 to k unique numbers representing the arbitrary labels of the classification.

ClusterNames

ClusterNames defined which names belongs to which unique number

Author(s)

Michael Thrun

Examples


## Not run: 
  Iris=datasets::iris
  SomeFactors=Iris$Species
  V=ClusterCreateClassification(SomeFactors)
  Cls=V$Cls
  V$ClusterNames
  table(Cls,SomeFactors)
  
  #Increasing alphabetical order
  V=ClusterCreateClassification(SomeFactors,Decreasing=FALSE)
  Cls=V$Cls
  V$ClusterNames
  table(Cls,SomeFactors)
  
## End(Not run)

Mthrun/FCPS documentation built on June 28, 2023, 9:29 a.m.