CPCdata.frame {CPC}R Documentation

Data Manipulation for CPC Calculation

Description

Converts numeric matrix to data frame with necessary format for "manual" CPC() calculation.

Usage

CPCdata.frame(data, cols, clusters)

Arguments

data

a numeric n x k matrix or data frame.

cols

columns in data to be used for calculating CPC().

clusters

column in data giving cluster membership.

Value

Returns a data frame with dimensions identical to those of data.

Examples

data <- matrix(c(rnorm(50, 0, 1), rnorm(50, 5, 1)), ncol = 2, byrow = TRUE)
clusters <- matrix(c(rep(1, 25), rep(2, 25)), ncol = 1)
data <- cbind(data, clusters)
CPCdata.frame(data, 1:2, 3)


[Package CPC version 2.6.0 Index]