Description Usage Arguments Examples
A wrapper for stats::mahalanobis
Computes the mahalanobis distance and adds it to the end of the data.frame as well as the outlier p-value.
1 2 3 |
x |
A data.frame or matrix of numeric values |
.f |
The centering function. Defaults to use 'mean'. |
inverted |
Logical. If TRUE, the covariance matrix (p x p) of the distribution is supposed to contain the inverse of the covariance matrix. |
df |
The data.frame to add |
cols |
A character vector of the columns to select from the data.frame |
1 2 | maha_d(iris[1:3])
add_maha_d(iris[1:3])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.