library(groupedHyperframe)47 pmean() and pmedian()
The examples in Chapter 47 require
datasets::VADeaths |>
apply(MARGIN = 2L, FUN = identity, simplify = FALSE) |>
do.call(what = pmean, args = _) |>
identical(
y = datasets::VADeaths |>
rowMeans()
) |>
stopifnot()datasets::VADeaths |>
apply(MARGIN = 2L, FUN = identity, simplify = FALSE) |>
do.call(what = pmedian, args = _) |>
identical(
y = datasets::VADeaths |>
matrixStats::rowMedians()
) |>
stopifnot()