search for: modifyx

Displaying 1 result from an estimated 1 matches for "modifyx".

Did you mean: modify
2007 Jun 20
1
non permanent change of vector values
Hi All, I have the following problem: I have a vector x = rep(0,15) x[1:2] = 1 x [1] 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 I need to be able to call that vector 'x' so that if condition 'A' is true, only the first value is kept 'as is' and all the others are put to 0 if(A == T) function(x) with x returning 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 and if 'A' is false the