1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-21 10:53:18 +02:00

(v2.1.1.9155) new mic_p50() and mic_p90() - updated AMR intro

This commit is contained in:
2025-02-23 11:18:08 +01:00
parent 226d10f546
commit aa8f6af185
24 changed files with 481 additions and 99 deletions

15
R/mic.R
View File

@ -346,6 +346,21 @@ rescale_mic <- function(x, mic_range, keep_operators = "edges", as.mic = TRUE) {
out
}
#' @rdname as.mic
#' @details Use [mic_p50()] and [mic_p90()] to get the 50th and 90th percentile of MIC values. They return 'normal' [numeric] values.
#' @export
mic_p50 <- function(x, na.rm = FALSE, ...) {
x <- as.mic(x)
as.double(stats::quantile(x, probs = 0.5, na.rm = na.rm))
}
#' @rdname as.mic
#' @export
mic_p90 <- function(x, na.rm = FALSE, ...) {
x <- as.mic(x)
as.double(stats::quantile(x, probs = 0.9, na.rm = na.rm))
}
#' @method as.double mic
#' @export
#' @noRd