trim_matdist | R Documentation |
Smooths the extreme values in a chi-square-transformed matrix to lessen the influence of "rare objects."
trim_matdist(mat, pct_trim = 0.01)
mat |
matrix; should be pre-processed/normalized to some sort of approximately normally distributed statistic (e.g., chi-squared transformation with 'corral_preproc' or Z-score normalization) |
pct_trim |
numeric; the percent of observations to smooth. Defaults to 'pct_trim' = .01, which corresponds to smoothing all observations to be between the .5 percentile and 99.5 percentile range of the input matrix |
(Usually not called directly; can be included by using the 'smooth' argument in the 'corral', 'corralm', and 'corral_preproc' functions)
smoothed matrix
count_mat <- matrix(rpois(10000, 300)*rbinom(10000,1,.1), ncol = 100) smoothed_preproc_mat <- corral_preproc(count_mat, smooth = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.