View source: R/multiscaleSVDxpts.R
interpret_simlr_vector2 | R Documentation |
This function interprets a vector from SiMLR (similarity-driven multivariate linear reconstruction) specifically focusing on a given variable (e.g., a specific principal component or cluster). It extracts and normalizes the vector associated with the specified SiMLR variable, sorts it to identify the top elements, and optionally filters out non-significant values. This function is useful for understanding the contribution of different features in the context of the SiMLR analysis. Assumes this input is generated by antspymm_simlr.
interpret_simlr_vector2(
simlrResult,
simlrVariable,
n2show = 5,
shortnames = TRUE,
return_dataframe = FALSE
)
simlrResult |
a specific v matrix out of SiMLR |
simlrVariable |
A string specifying the variable within 'simlrResult' to interpret. The variable name should include both an identifier (e.g., "PC" for principal component) and a numeric index. |
n2show |
An integer specifying the number of top elements to show from the sorted, normalized vector. Defaults to 5. If 'NULL' or greater than the length of the vector, all elements are shown. |
shortnames |
boolean |
return_dataframe |
boolean |
A named vector of the top 'n2show' elements (or all if 'n2show' is 'NULL' or too large), sorted in decreasing order of their absolute values. Elements are named according to their identifiers in 'simlrMats' and filtered to exclude non-significant values (absolute value > 0).
# This example assumes you have SiMLR result `simlrResult`, matrices `simlrMats`, and you want to
# interpret the first principal component "PC1".
# simlrResult <- list(v = list(PC = matrix(runif(20), ncol = 2)))
# simlrMats <- list(PC = matrix(runif(100), ncol = 10))
# simlrVariable <- "PC1"
# interpretedVector <- interpret_simlr_vector2(simlrResult$v[[1]] )
# print(interpretedVector)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.