Skip to contents

Returns the leftmost non-missing value in each row of a matrix or data frame. Returns NA if an entire row is missing.

Usage

OR.rowleft(input)

Arguments

input

A matrix or data frame.

Value

A vector of the leftmost non-missing values by row.

Details

An example use case is single imputation where column order defines the hierarchy of preference, such as prioritizing tumor grade from the surgical resection specimen and falling back to the core biopsy result if this is missing.