s.distance {ldt} | R Documentation |
Get the Distances Between Variables
Description
This function calculates the distances between the columns of a numeric matrix.
Usage
s.distance(
data,
distance = "correlation",
correlation = "pearson",
checkNan = TRUE
)
Arguments
data |
A numeric matrix with variables in the columns. |
distance |
Character string specifying the type of distance.
It can be |
correlation |
Character string specifying the type of correlation if |
checkNan |
Logical value indicating whether to check for |
Details
The main purpose of exporting this statistics helper method is to show the inner calculations of the package.
Value
A symmetric matrix (lower triangle as a vector).
Examples
n <- 10
data <- data.frame(x = rnorm(n), y = rnorm(n), z = rnorm(n))
distances <- s.distance(data)
[Package ldt version 0.5.3 Index]