Displaying 1 result from an estimated 1 matches for "uneqaulity".
Did you mean:
inequality
2006 Feb 08
2
logical condition in vector operation
HI All,
I have a data frame such as:
> test
x y p d
[1,] 1 0 10 21 0
[2,] 2 3 11 12 0
[3,] 3 4 12 23 0
[4,] 3 5 13 24 0
and I want to perfor some operations on the first two coulums,
conditional on the uneqaulity values on the 3rd and 4th columns.
For instance:
j = 3
test[test[,1] == j, 5] = test[test[,1] == j,2] + test[test[,2] == j,1]
gives me the result:
test:
x y p d
[1,] 1 0 10 21 0
[2,] 2 3 11 12 0
[3,] 3 4 12 23 6
[4,] 3 5 13 24 7
My probblem is the following: I want to perform the oper...