compute_normalize | R Documentation |
Performs per-state normalization by dividing state values by: range (max-min) or sd (standard deviation). none means no normalization is performed.
compute_normalize(res_mat, method = c("none", "range", "sd"), ref_stats = NULL)
res_mat |
Trajectory matrix, first column must be time while others are states. |
method |
State normalization method, one of "none", "range", "sd". |
ref_stats |
Optional list containing pre-computed normalization statistics
(e.g., from a previous call to |
Normalized trajectory matrix with attribute "ref_stats"
containing
normalization parameters.
mat <- cbind(time = 1:10, matrix(runif(30, 0, 10), ncol = 3))
# Range normalization with automatic stat computation
norm_mat1 <- compute_normalize(mat, "range")
# Reuse stats for another matrix
mat2 <- cbind(time = 1:10, matrix(runif(30, 5, 15), ncol = 3))
norm_mat2 <- compute_normalize(mat2, "range", attr(norm_mat1, "ref_stats"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.