SilhouetR: SilhouetR

Description Usage Arguments Value Author(s) Examples

View source: R/SilhouetR.R

Description

Calculate the Silhouette value for

Usage

1
SilhouetR(DataMatrix, GroupIndices, distance = "euclid", stand = TRUE)

Arguments

DataMatrix

a matrix with the raw data, 1 variable per column.

GroupIndices

The vector with the roup indices (length must be equal to the amount of rwos in DataMatrix).

distance

The distance metric to be used, see daisy.

stand

whether to standardize the data before calculating the dissimilarities. See daisy.

Value

Returns the silhouette values.

Author(s)

Charlie Beirnaert, charlie.beirnaert@uantwerpen.be

Examples

1
2
3
4
5
6
7
8
## Not run: 
# This function works on aligned peak data
library(ggplot2)
Silhouette.values = SilhouetR(DataMatrix = Aligned.peaks$peakPPM, 
Aligned.peaks$peakIndex, distance = 'euclid', stand = TRUE)
ggplot(SilhouetteValues, aes(SilhouetteValues)) +geom_freqpoly(binwidth = 0.03) +theme_bw()

## End(Not run)

speaq2 documentation built on May 6, 2017, 4:09 a.m.

Related to SilhouetR in speaq2...