| depth_median | R Documentation |
Compute the depth median of a data set.
depth_median(x, notion = "zonoid", ...)
x |
Matrix of data whose depth median is to be calculated; see
|
notion |
The name of the depth notion (shall also work with a user-defined depth function named |
... |
Additional parameters passed to the depth functions. |
This function is called internally by stat_bagplot() and can be
passed to stat_center() but is also exported directly for data analysis.
A one-row matrix of depth median coordinates.
# sample median
iris %>%
subset(select = -Species) %>%
depth_median()
# groupwise medians
iris %>%
split(~ Species) %>%
lapply(subset, select = -Species) %>%
lapply(depth_median) %>%
simplify2array() %>% t() %>% as.data.frame()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.