do.zscore | R Documentation |
do.zscore - Calculate z.score for a dataset
do.zscore(dat, use.cols)
dat |
NO DEFAULT. A data.table (or data.frame) containing the data to be converted to z-scores. Z-score transformed values will be added as new columns. |
use.cols |
NO DEFAULT. The columns to be used for z-score calculations. |
append.name |
DEFAULT = '_zscore'. Text to be appended to the end of the new z-score transformed columns. |
replace |
DEFAULT = FALSE. If FALSE, appends new columns to the data.table. If TRUE, replaces the values in the existing columns with the z-score tranformed values, and does not change the column names. |
Returns a new data.table with z-score calculations for each selected column
do.zscore(dat = Spectre::demo.clustered, use.cols = c("NK11", "CD4"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.