Re: [R] replacing elements of vector through elements of another vector

2011-07-28 Thread Marcus Mund
Dear Marc and David, thank you so much for casting off my blinkers - it works! Marcus Am 27.07.2011 17:52, schrieb David Winsemius: > On Jul 27, 2011, at 10:52 AM, Marcus Mund wrote: > >> Hello everybody, >> >> I hope this question is not too silly but I'm almost going crazy about >> that and

Re: [R] replacing elements of vector through elements of another vector

2011-07-27 Thread David Winsemius
On Jul 27, 2011, at 10:52 AM, Marcus Mund wrote: Hello everybody, I hope this question is not too silly but I'm almost going crazy about that and could not find a solution. I have two variables, say A and B and I would like to combine them in C. In particular I want a C-value of B when B is

Re: [R] replacing elements of vector through elements of another vector

2011-07-27 Thread Marc Schwartz
On Jul 27, 2011, at 9:52 AM, Marcus Mund wrote: > Hello everybody, > > I hope this question is not too silly but I'm almost going crazy about > that and could not find a solution. > > I have two variables, say A and B and I would like to combine them in C. > In particular I want a C-value of B w

[R] replacing elements of vector through elements of another vector

2011-07-27 Thread Marcus Mund
Hello everybody, I hope this question is not too silly but I'm almost going crazy about that and could not find a solution. I have two variables, say A and B and I would like to combine them in C. In particular I want a C-value of B when B is not NA and the A value in case that B is NA: A B