Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.51.0304031553460.22960@artemis.imbe.med.uni-erlangen.de>
Date: 2003-04-03T13:54:21Z
From: Torsten Hothorn
Subject: Efficiency: whole vector and for loop methods
In-Reply-To: <200304030052.QAA09307@hivnet.ubc.ca>

>
> 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()' !

Torsten

> 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.
>
> Jerome
>
> 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
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
>