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:
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]]
Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Archive generated by hypermail 2.2.0, at Fri 31 Oct 2008 - 18:30:20 GMT.
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.
list of date sections of archive