minhafuncao <- function(a, b, c) {
return(a * b + c)
}
x <- array(1:15, dim=c(5,3))
x
apply(x, 1, function(arr) do.call("minhafuncao", lapply(arr, identity)))
bWluaGFmdW5jYW8gPC0gZnVuY3Rpb24oYSwgYiwgYykgewogICAgcmV0dXJuKGEgKiBiICsgYykKfQoKeCA8LSBhcnJheSgxOjE1LCBkaW09Yyg1LDMpKQp4CgphcHBseSh4LCAxLCBmdW5jdGlvbihhcnIpIGRvLmNhbGwoIm1pbmhhZnVuY2FvIiwgbGFwcGx5KGFyciwgaWRlbnRpdHkpKSkK
[,1] [,2] [,3]
[1,] 1 6 11
[2,] 2 7 12
[3,] 3 8 13
[4,] 4 9 14
[5,] 5 10 15
[1] 17 26 37 50 65