Convert discrete annotations to dummy variable matrices.

codeY_vec(vec, rowNames = NULL, method = c("-1,1", "0,1"))

Arguments

vec

Factor contanining class labels.

rowNames

Optional. Row names for output dummy matrix (eg cell barcode).

method

Which coding to use, either (-1,1) or (0,1).

Value

YY

A dummy variable matrix encoding discrete annotation