meddiff_for_display: A version of 'meddiff' to compute median differences in a...

View source: R/functions.R

meddiff_for_displayR Documentation

A version of meddiff to compute median differences in a different format

Description

A version of meddiff to compute median differences in a different format

Usage

meddiff_for_display(xmat, threshold = 5)

Arguments

xmat

A numeric matrix

threshold

Numeric scalar, minimum number of pairs needed for computation of a median difference

Value

A list, with one vector component for each column of xmat

Examples

#
# Toy example from
# https://davidfirth.github.io/blog/2019/04/26/robust-measurement-from-a-2-way-table/
#
x <- structure(c(NA, NA, 10, NA, NA, 20, NA, NA, 30, 45, 55, NA, 60, 60, 50),
  .Dim = c(3L, 5L), .Dimnames = structure(list(student = c("i", "j", "k"),
  module = c("A", "B", "C", "D", "E")), .Names = c("student", "module")))
print(x)
meddiff_for_display(x, threshold = 1)


DavidFirth/norman documentation built on June 30, 2022, 6:05 p.m.