search for: imprv1

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

2002 Aug 02
3
I know this is wrong, but why?
My mind has become corrupted by having to use SAS too much. I wanted to calculate the difference of elements of two vectors if the signs are the same. I tried it the corrupted way first: if (effects1[,3] < 0 & effects0[,3] < 0) { imprv1 <- effects0[,3] - effects1[,3] } else if (effects1[,3] > 0 & effects0[,3] > 0) { imprv1 <- effects1[,3] - effects0[,3] } else { imprv1 <- NA Then I realized it was giving me wrong results, (for one thing, I was getting no NAs) and I should be doing it ``The R Way''...