Skip to content
Prev 323229 / 398503 Next

[newbie] *apply to matching elements of n arrays?

Not particularly interested in "points" from you. Would like reproducibility from you [1], including dput of before and after data, and (inefficient) code of course.

 For loops are part of R.. If your data structure is not set up to take advantage of vectorization, then for loops are generally of the same order of speed as apply functions, and are perfectly usable. You may benefit from sensible memory management optimizations, or from a data reorganization so you can do vector computations.

[1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.
Tom Roche <Tom_Roche at pobox.com> wrote: