Dear all,
 
I have a matrix with positive and negative values.
>From this I would like to produce 2 matrices:
1st - retaining positives and putting NA in other positions
2nd - retaining negatives and putting NA in other positions
 
and then apply rowMeans for both.
 
I am trying to use the function ifelse in the exemplified form:
ifelse(A>0,A,NA)
but by putting A as a 2nd parameter it changes dimensions of the original
object.
 
I wonder if I can do this, as it seems not to difficult.
 
thanks in advance

	[[alternative HTML version deleted]]

