Convert data values to percent signal.

pct_sig(X, center = median, by = c("column", "all"))

Arguments

X

a \(T\) by \(N\) numeric matrix. The columns will be normalized to percent signal.

center

A function that computes the center of a numeric vector. Default: median. Other common options include mean and mode.

by

Should the center be measured individually for each "column" (default), or should the center be the same across "all" columns?

Value

X with its columns normalized to percent signal. (A value of 85 will represent a -15% signal change.)