median_index | R Documentation |
Applies function to the indices of each vector
in `...`
.
These functions were created with create_n_fn()
.
median_index(..., negate = FALSE, round_fn = round)
quantile_index(..., prob, type = 7, negate = FALSE, round_fn = round)
... |
Numeric |
negate |
Whether to negate the result. I.e. to multiply it with |
round_fn |
Function for rounding output. Rounding is done prior to negation. E.g. |
prob |
Probability in |
type |
Quantile algorithm to use. See |
numeric vector
with one element per supplied vector.
Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk
Other n functions:
create_n_fn()
# Attach packages
library(rearrr)
# Set seed
set.seed(1)
# Create three vectors
x <- runif(10)
y <- runif(15)
z <- runif(20)
median_index(x, y, z)
quantile_index(x, y, z, prob = 0.2)
# Negate result
median_index(x, y, z, negate = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.