s-news
[Top] [All Lists]

Re: Matrix subsets of arbitrary dimension

To: "'s-news@lists.biostat.wustl.edu'" <s-news@lists.biostat.wustl.edu>
Subject: Re: Matrix subsets of arbitrary dimension
From: "Paul, David A" <paulda@BATTELLE.ORG>
Date: Tue, 25 Jun 2002 18:43:02 -0400
Here is one way in which my previous post can be addressed:

Data.Subset <-
Data[xor(!is.element(Data[,2],0),(is.element(Data[,2],0)&!is.element(Data[,7
],0))),]

My original dataframe contained observations corresponding to censored
control animals.  A "0" in column 2 denoted a control.  A "0" in column 7
denoted a censored animal.  We have reason to believe that the censoring in
our control animals is an artifact of some nonrandom experimental
conditions, and we wished to see how our survival analysis would change
after eliminating the censored controls.  The code above does this.

-david paul

-----Original Message-----
From: Paul, David A [mailto:paulda@BATTELLE.ORG]
Sent: Tuesday, June 25, 2002 6:06 PM
To: 's-news@lists.biostat.wustl.edu'
Subject: [S] Matrix subsets of arbitrary dimension


Searching the S-news archive revealed a suggestion by John Fox to use

        mat[is.element(mat[,1],2*1:5),]

as a way of obtaining a matrix subset of a priori unknown dimensions when
one knows the values one wishes to match.  Can anyone suggest a method to 
use when one knows the values one *does not* wish to match?  My goal is
to be able to obtain dataframe or matrix subsets based on excluding rows
that
have undesirable values in them.

 David Paul, Ph.D.
  Battelle Memorial Institute
  505 King Avenue
  Columbus, OH  43201
  614.424.3176

--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news


<Prev in Thread] Current Thread [Next in Thread>