Nothing
#' Columun means of a matrix based on a grouping variable
#'
#' Similar to rowsum, but for mean values.
#' @param x a matrix
#' @param group a factor with one element per row of x
#' @param ... additional arguments are passed to rowsum()
#' @return a matrix containing the means, with one row per level of group.
#' @export
rowmean <- function(x,group,...) {
n <- rowsum(x,group,...)
n / as.vector(table(group)[rownames(n)])
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.