Hello,

On Tue, Jun 12, 2012 at 12:44 PM, Michael <comtech....@gmail.com> wrote:
> Hi all,
>
> Lets say I have a matrix A which is m x n.
>
> I also have a mask matrix MASK which is m x n with values in T/F, where T
> values make a sub-matrix in regutangular shape...
>
> I applied B=A[MASK] and it didn't work as expected...
>
> Any thoughts?

  What did you expect and what happened?

  I'm assuming you did:

  B <- A[MASK]

  and I would expect the the result would be a vector whose size is
the number of elements in MASK that is TRUE. To get a matrix, you then
set the dim attribute (but I didn't test that).

     Take care
     Oliver

-- 
Oliver Ruebenacker
Bioinformatics Consultant (http://www.knowomics.com/wiki/Oliver_Ruebenacker)
Knowomics, The Bioinformatics Network (http://www.knowomics.com)
SBPAX: Turning Bio Knowledge into Math Models (http://www.sbpax.org)

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to