getClusters: Generic clustering function

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/getClusters.R

Description

Compute clustering with pam function and a distance class object.

Usage

1

Arguments

x

Numeric distance object obtained with dimension n x n.

k

Numeric. Number of clusters

Details

This function is a wrapper of pam (cluster). x must be a dist object obtained from frechetdist, slopedist or any other distance metric on condition that it be an object of the dist class and has dimensions nxn, where n is equal to the number of trajectories.

Value

Object of class 'pam'. See pam.object for details

Author(s)

Fernando Pérez-Sanz (fernando.perez8@um.es)

Miriam Riquelme-Pérez (miriam.riquelmep@gmail.com)

See Also

pam, plotCluster.

Examples

1
2
3
4
5
data(tscR)
data <- tscR
time <- c(1,2,3)
dist_tscR <- slopeDist(data, time)
res.cluster <- getClusters(dist_tscR, 3)

tscR documentation built on Nov. 8, 2020, 5:53 p.m.