myapply: My Apply Function

Description Usage Arguments Value Examples

Description

Myapply function just like the function array function(X, MARGIN, FUN, ...)

Usage

1
myapply(X, MARGIN, FUN, ...)

Arguments

X

a matrix

MARGIN

either (the number) 1 or (the number) 2

FUN

an R function that maps vectors to vectors

Value

array or matrix

Examples

1
2
3
m <- matrix(1:6, ncol = 2)
s = array(rnorm(72),c(3,3,8))
result10 <- myapply(m,1,"mean")

jackingg/ChangbaiLiTools documentation built on May 25, 2019, 6:22 p.m.