Learn R Programming

CPC (version 2.6.2)

SS: Sum-of-Squares Calculation

Description

Calculates sums of squares for uni- or multi-dimensional numeric data using the distance matrix.

Usage

SS(data, ...)

Value

Returns a numeric vector of length 1.

Arguments

data

a numeric vector or n x k matrix or data frame.

...

arguments passed to dist().

Examples

Run this code
data <- matrix(c(rnorm(50, 0, 1), rnorm(50, 5, 1)), ncol = 2, byrow = TRUE)
SS(data)

Run the code above in your browser using DataLab