[R] Help with applying a function to all possible 2x2 submatrices

Bert Gunter gunter.berton at gene.com
Tue Oct 23 01:20:49 CEST 2012


Inline.

On Mon, Oct 22, 2012 at 1:10 PM, CMB123 <craig.bielski at gmail.com> wrote:
> I apologize if the term "submatrix" was confusing - I am basically 2 rows and
> 2 columns from a r x c matrix to construct 2x2 matricies. Thus, the
> choose(r,2) * choose(c,2) possible combinations.
>
> For each matrix [(a,b), (c,d)],
What does that mean? -- it ain't R syntax. Is (a,b) a row or column?

Also, please don't post through Nabble, as R-help is a separate
mailing list and we lose context here (and don't wish to mess with
Nabble).

-- Bert

-- Bert


I am testing a > b, b > d, d > c, and c > a.
> For the sake of simplicity I have combined these tests into a single
> function (with the intent of applying it to the matrix, ideally).
>
> I hope this is clearer...
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Help-with-applying-a-function-to-all-possible-2x2-submatrices-tp4647048p4647065.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.



-- 

Bert Gunter
Genentech Nonclinical Biostatistics

Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm




More information about the R-help mailing list