[R] Efficiency: whole vector and for loop methods
Torsten.Hothorn at rzmail.uni-erlangen.de
Thu Apr 3 15:54:21 CEST 2003
> Based on your particular problem, you can test the efficiency of any
> method you can think of with the system.time() function.
or, much more informative, by profiling via `Rprof()' !
> I find it
> difficult to give a better advice considering the little information you
> provided about your problem.
> If that doesn't help, perhaps you could send a simple and reproducable
> example of what you want to do.
> On April 2, 2003 09:41 am, graham lawrence wrote:
> > Content-Length: 535
> > Status: R
> > X-Status: N
> > Dear R-help,
> > As a generalization, is it more efficient to use a single method to
> > selectively transform items in a matrix? Preferably whole-vector, yes;
> > but if one of the column vectors compels the use of a "for loop", is it
> > then faster to do all of the transformations for the matrix via that
> > "for loop", rather than use a mixture of methods on a column-wise basis?
> > TIA
> > graham lawrence
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> R-help at stat.math.ethz.ch mailing list
More information about the R-help