R/rje-internal.R

.sweep0 <-
function (x, MARGIN, STATS, FUN = "-") 
{
    FUN <- match.fun(FUN)
    dims <- dim(x)
    perm <- c(MARGIN, seq_along(dims)[-MARGIN])
    FUN(x, aperm.default(array(STATS, dims[perm]), order(perm)))
}

Try the rje package in your browser

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

rje documentation built on Nov. 12, 2022, 9:06 a.m.