s-news
[Top] [All Lists]

subsetting data frames

To: <s-news@lists.biostat.wustl.edu>
Subject: subsetting data frames
From: "Dr Stuart Leask" <stuart.leask@nottingham.ac.uk>
Date: Wed, 13 Dec 2000 15:28:07 -0000
I have looked in the archives, without luck. Perhaps this question is just
_too_ basic.
I want to subset my dataframe 'data.df' by the variable 'flag' (flag is a
variable in data.df).
> datasubset.df<-data.df[flag==1]
does not work.
There must be an easy way!
Stuart

*************************************************************
Stuart Leask MA MRCPsych
Clinical Lecturer in Psychiatry
Duncan Macmillan House
Porchester Road               "Ask a clock how it works, &
Nottingham                    all it will tell you is the time"
UK   NG3 6AA
Tel: +44-0 115 969 1300 xtn 40784 Fax: 0115 955 5352
*************************************************************


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