Skip to contents

Given a data-matrix of numeric data, calculates the rank of each row in each column (feature in sample), gets the median rank across all columns, and returns the original data with missing values set to NA, the reordered data, and a data.frame of the ranks of each feature and the number of missing values.

Usage

rank_order_data(data_matrix, global_na = c(NA, Inf, 0), sample_classes = NULL)

Arguments

data_matrix

matrix or data.frame of values

global_na

the values to consider as missing

sample_classes

are the columns defined by some metadata?

Value

list with two matrices and a data.frame