Skip to content
Prev 361083 / 398506 Next

Element-by-element operation (adding)

Two solutions...

v + matrix(b, nrow(v), ncol(v), byrow = TRUE)

or

t(apply(v, 1, `+`, b))

Peter
On Sun, May 22, 2016 at 10:39 PM, Steven Yen <syen04 at gmail.com> wrote: