mop_distance {mop} | R Documentation |
MOP distance calculation
Description
Calculates distances from each of the points of interest in g_matrix
to a defined percentage of the reference conditions in m_matrix
.
Usage
mop_distance(m_matrix, g_matrix, distance = "euclidean", percentage = 1,
comp_each = 2000, tol = NULL, parallel = FALSE, n_cores = NULL,
progress_bar = TRUE)
Arguments
m_matrix |
matrix of variables representing the set of conditions to be used as reference. Each column represents a variable. |
g_matrix |
matrix of variables representing the set of conditions to be
compared against the reference conditions (where distances are to be
calculated). Each column represents a variable. Variable names must match
those in |
distance |
|
percentage |
|
comp_each |
|
tol |
tolerance to detect linear dependencies when calculating
Mahalanobis distances. The default, NULL, uses |
parallel |
|
n_cores |
|
progress_bar |
|
Value
A numeric vector with values of distances calculated according to parameters used.
Examples
# data
data("reference_matrix", package = "mop")
data("matrix_of_interest", package = "mop")
# analysis
mop_dist <- mop_distance(m_matrix = reference_matrix,
g_matrix = matrix_of_interest)