Skip to content
Prev 305065 / 398513 Next

Apply a function to columns of a matrix

Is this what you wanted?  You had two arguments to your function, but
only supplying one via the 'apply'.  Also your argument names were the
same as your variables which was confusing.
[1]   99  279  459  639  819  999 1179 1359 1539 1719
Were you assuming that you could reference the value of 'b' within the
function?  If so, you could have done this:
[1]   99  279  459  639  819  999 1179 1359 1539 1719

        
On Sat, Sep 8, 2012 at 3:45 PM, Andras Farkas <motyocska at yahoo.com> wrote: