| To: | Chushu Gu <chushugu@hotmail.com> |
|---|---|
| Subject: | Re: Matrix question |
| From: | Spencer Graves <spencer.graves@pdf.com> |
| Date: | Sat, 25 Oct 2003 03:18:10 -0700 |
| Cc: | s-news@lists.biostat.wustl.edu |
| In-reply-to: | <Law11-OE646X0ZB9zBo0000b3ad@hotmail.com> |
| References: | <Law11-OE646X0ZB9zBo0000b3ad@hotmail.com> |
| User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) |
With A2 = your matrix, I get your answer from "apply(A2, 2,
function(x)which(!x)[1])".
hope this helps. spencer graves Chushu Gu wrote: Dear All,I have a matrix T T F TT T T T T T F T T F T F F T T F T F F T F T F FWhat I need is to get the first F location in every column. The result I want is (5,4,1,4), How I use "which" to conquer this problem? Chushu Gu |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Matrix question, Chushu Gu |
|---|---|
| Next by Date: | Re: Matrix question, Chushu Gu |
| Previous by Thread: | Re: Matrix question, Chushu Gu |
| Next by Thread: | Re: Matrix question, Chushu Gu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |