Re: [R] Matrix multiplication using apply() or lappy() ?

From: Gregor Gorjanc <>
Date: Mon 11 Sep 2006 - 07:57:53 GMT

Jeffrey J. Hallman <jhallman <at>> writes:
> Tim Hesterberg <timh <at>> writes:
> > toby_marks <at> asked:
> > >I am trying to divide the columns of a matrix by the first row in the
> > >matrix.
> >
> > Dividing columns of a matrix by a vector is a pretty fundamental
> > operation, and the query resulted in a large number of suggestions:
> >
> > It is unsatisfactory when such a fundamental operation is
> > done in so many different ways.
> > * It makes it hard to read other people's code.
> > * Some of these are very inefficient.
> But since you have no way to force people to use your new 'standard'
> operators, people can and will still use any of those myriad ways you decry to
> do the same thing. It's part of the price you pay for working with a flexible
> system.
> Besides, nothing will ever make it easy to read other people's code.

Reading others code is never an easy task, but there are huge differences between various "authors" and I agree with Tim, that it is nice to have some standardized operators for common/fundamental operations. If there are standard operators, people will use it more an more. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Mon Sep 11 18:09:08 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 11 Sep 2006 - 09:30:04 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.