condvis2 (version 0.1.1)

clusPath: Constructs tours of data space based on centers of clusters

Description

Constructs tours of data space based on centers of clusters

Usage

kmeansPath(data, length = 10, reorder = TRUE, conditionvars = NULL, ...)

pamPath( data, length = 10, reorder = TRUE, conditionvars = NULL, maxn = 4000, ... )

claraPath(data, length = 10, reorder = TRUE, conditionvars = NULL, ...)

medoidPath(data, cl, reorder = FALSE)

centroidPath(data, cl, reorder = FALSE)

Value

A dataframe with the path

Arguments

data

A dataframe

length

Path length, defaults to 10

reorder

If TRUE uses DendSer to reorder the path dser

conditionvars

A vector of variable names. The returned tour is for this subset of variables.

...

ignored

maxn

(pamPath only) For datasets with more than maxn rows, use maxn randomly selected rows.

cl

A vector specifying cluster membership for rows of data.

Functions

  • kmeansPath: Constructs a tour of data space following length k-means centroids

  • pamPath: Constructs a tour of data space following length pam medoids

  • claraPath: Constructs a tour of data space following length clara medoids

  • medoidPath: Returns a path visiting cluster medoids

  • centroidPath: Returns a path visiting cluster centroids

Examples

Run this code
kmeansPath(mtcars,length=4)
pamPath(mtcars,length=4)
claraPath(mtcars,length=4)
medoidPath(mtcars,cl=rep(1:3, length.out=nrow(mtcars)))

Run the code above in your browser using DataCamp Workspace