condense | R Documentation |
Condenses columns of a matrix by averaging or summing them. The condensing can be done partially: a multiple of the repetitions can be averaged or summed to keep some repetitions.
condense(m, n, fun = "mean")
m |
matrix of repeated signal, each column being a repetition |
n |
the number of repetitions that will be averaged/summed |
fun |
the function to apply to each repetition: "mean" or "sum". |
a matrix with n times less columns
m <- matrix(rep(seq(100, 800, 100), each = 10) + rep(1:10, 8), ncol = 8) m condense(m, 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.