Description Usage Arguments Details Value
Median of multidimensional data
1 |
x |
a matrix, data frame or vector of data points (a vector will be understood as 1D data, equivalent to a 1-column matrix). Rows with NA values will be dropped. |
metric |
a choice of 'euclidean','maximum','manhattan','canberra','minkowski', or 'binary'. Any unambiguous substring can be given, case insensitive. |
q |
the power in the minkowski metric. If |
simple1d |
boolean, if TRUE, will resort to the standard |
... |
other arguments passed to |
The median is calculated as the minimizer m of the sum of distances ||x_i-m||, where x_i are the data points.
In an N-dimensional space, each x_i is an N-dimensional vector, and so is m.
The distances are calculated according to the metric chosen (Euclidean by default). Minimization is done with Rcgmin
(note that exotic metrics you might cause convergence issues).
In 1D case, unless simple1d
is FALSE, the standard median
function is used instead of this method.
a vector of median components.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.