Skip to content
Prev 277634 / 398521 Next

apply on rows and columns?

Hi,
On Wed, Nov 16, 2011 at 3:13 PM, <rkevinburton at charter.net> wrote:
I'm pretty sure R is taking the sum of m[1,1] and putting it [1,1],
and the sum of m[1,2] and putting it in [1,2] and so on. You
instructed apply() to work on rows and columns *simultaneously*,
rather than sequentially.

apply() on c(1,2) is useful if you have a matrix that's three-dimensional,
but not so much if it's two dimensional.

What are you trying to accomplish?

Sarah