lapply sequence
On 20/04/2011 7:26 AM, Dean Marks wrote:
Good day, My question is: Does the lapply function guarantee a particular sequence in which elements are mapped? And, are we guaranteed that lapply will always be sequential (i.e. never map elements in parallel) ?
No.
The reason I ask is if I use lapply with the mapping function set to something that has side-effects that need to be executed in a particular sequence.
Use a for loop.
If this is not possible, is there an alternate method other than using a for loop?
while or repeat. Duncan Murdoch