Re: [R] Trying to pass arrays as arguments to a function

2008-10-20 Thread Claudia Beleites
> I'd like to avoid looping through an array in order to change values in > the array as it takes too long. > I red from an earlier post it can be done by "do.call" but never got it > to work. The Idea is to change the value of "y" according to values in > "x". Wherever "x" holds the value 3, the c

Re: [R] Trying to pass arrays as arguments to a function

2008-10-20 Thread Philipp Pagel
On Mon, Oct 20, 2008 at 03:07:45PM +0200, Kåre Edvardsen wrote: > I'd like to avoid looping through an array in order to change values in > the array as it takes too long. > I red from an earlier post it can be done by "do.call" but never got it > to work. The Idea is to change the value of "y" ac

Re: [R] Trying to pass arrays as arguments to a function

2008-10-20 Thread Kaom Te
y <- ifelse(x == 3, 1, y) -Kaom On Oct 20, 2008, at 6:07 AM, Kåre Edvardsen wrote: I'd like to avoid looping through an array in order to change values in the array as it takes too long. I red from an earlier post it can be done by "do.call" but never got it to work. The Idea is to change

[R] Trying to pass arrays as arguments to a function

2008-10-20 Thread Kåre Edvardsen
I'd like to avoid looping through an array in order to change values in the array as it takes too long. I red from an earlier post it can be done by "do.call" but never got it to work. The Idea is to change the value of "y" according to values in "x". Wherever "x" holds the value 3, the correspondi