sorry, did not see your data at the bottom of the email
Sent from my iPad
On Aug 29, 2011, at 9:55, Chris Beeley wrote:
> Hello-
>
> Sorry to ask a basic question, but I've spent many hours on this now
> and seem to be missing something.
>
> I have a loop that looks like this:
>
>mainmat
use Rprof to see where thr time is spent.
take the strsplit out of the loop and do it once outsidr to create an object
you can test against in the loop.
you can probably get rid of the loop easily, but since there is no example of
the data, it is hard to create a solution.
Sent from my iPad
You are somewhere in Circles 3 and 4 of
'The R Inferno'.
If you have a function to apply over more
than one argument, then 'mapply' will do
that.
But you don't need to do that -- you can do
the operation you want efficiently:
*) create your resulting matrix with all zeros,
no reason for this to
3 matches
Mail list logo