Skip to contents

Discretize the columns in a pheno tibble that belong to the features of the International Prognostic Index (IPI) into binary indicator columns by comparing them to cutoff values and append them to the pheno tibble.

Usage

discretize_tbl_cols(tbl, col_names, cutoffs, gl = NULL)

Arguments

tbl

tibble.

col_names

character vector. Discretize the columns in tbl that have these names.

cutoffs

numeric vector of the same length as character vector. The cutoff values corresponding to the columns in col_names.

gl

character vector of the same length as col_names holding ">" and "<" entries. Discretize via greater (> cutoffs) or less (< cutoffs). Default is NULL, in which case all columns are discretized via > cutoffs.

Value

tbl with discretized columns as numeric columns appended.

Details

You will not need this function very often.