Re: [R] using mapply to avoid loops

2009-10-14 Thread David Winsemius
On Oct 14, 2009, at 12:58 AM, Stephen Samaha wrote: Hello, I would like to use mapply to avoid using a loop but for some reason, I can't seem to get it to work. I've included copies of my code below. The first set of code uses a loop (and it works fine), and the second set of code

[R] using mapply to avoid loops

2009-10-13 Thread Stephen Samaha
Hello, I would like to use mapply to avoid using a loop but for some reason, I can't seem to get it to work. I've included copies of my code below. The first set of code uses a loop (and it works fine), and the second set of code attempts to use mapply but I get a subscript out of bounds error.