R/ma_colMode.R

Defines functions ma_colMode

## File Name: ma_colMode.R
## File Version: 0.05

ma_colMode <- function(x)
{
    res <- apply( x, 2, FUN=function(samples){
                ks <- stats::density(samples)
                ks$x[ which.max(ks$y) ]
            } )
    return(res)
}

Try the miceadds package in your browser

Any scripts or data that you put into this service are public.

miceadds documentation built on Jan. 7, 2023, 1:09 a.m.