Spark Online Training by Edureka

f_distance2vector: Conversion of the lower triangular matrix of a distance...

Description Usage Arguments Value Examples

Description

Auxiliary function to convert of the lower triangular matrix of a distance matrix into an array

Usage

1

Arguments

distance

A distance matrix or a symmetric matrix

Value

Array resulting from the concatenation of the rows of the lower triangular matrix of the input symetric matrix. Array length is n*(n-1)/2, where n is the number of rows of the symetric matrix.

Examples

1
2
3
4
5
6
## Generate some data
Data <- matrix(rnorm(300),ncol=10,nrow=30)

## Calculate distance matrix and transform its lower triangular matrix into a one 
## dimensional array
d <- f_distance2vector(as.matrix(dist(Data)))


Search within the sincell package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.