View source: R/normalization.R
TSS | R Documentation |
This function transforms a dataset from absolute to relative frequencies (by row or column).
TSS(X, rows = TRUE)
X |
Numeric matrix or data.frame of any size containing absolute frequencies. |
rows |
If TRUE, the operation is done by row; otherwise, it is done by column. (Defaults: TRUE). |
A relative frequency matrix or data.frame with the same dimension than X.
dat <- matrix(rnorm(50),ncol=5,nrow=10)
TSS(dat) #It can be checked that, after scaling, the sum of each row is equal to 1.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.