This is a wrapper for matrixStats::rowMedians that doesn't crash if a vector is provided as input

rowMedians(x, ...)

Arguments

x

a matrix or vector of values

Value

if the input is a matrix, return row medians. If a vector, it returns the inputted vector