[18889] in s-news-athena

home help back first fref pref prev next nref lref last post

[S] (Revised): "runs" of missing data in a large vector /RLE/tapply/L ist

daemon@ATHENA.MIT.EDU (Barker, Chris {PHAR~Palo Alto})
Sun Aug 8 20:34:34 1999

Content-Return: allowed
Date: Sun, 08 Aug 1999 17:05:43 -0700
From: "Barker, Chris {PHAR~Palo Alto}" <CHRIS.BARKER@ROCHE.COM>
To: "'s-news@wubios.wustl.edu'" <s-news@wubios.wustl.edu>
Message-Id: <B9E51B9719BDD111AB640000F80197CD01646368@rplmsem2.pal.roche.com>
Mime-Version: 1.0
Content-Type: text/plain; CHARSET=US-ASCII


Thanks to Bill Dunlap and Bill Venables for replying to my question

I had forwarded a question to the list about a function I had written which
computed  "runs" of missing data (NA's) in a vector.
Bill Dunlap noted that a function "rle" already existed in SPLUS that could
determine "runs".

Bill Venables pointed out that his email system apparently clobbered
the code sample in my email (I surmise this may happen to others). 
At his request I'm resubmitting (and updating) my question

I have a dataframe with about 6000( six thousand)  patients.
 Each patient is measured on each of 6 different 'visits".
My data frame has 6000*6 records.

Prior to preparing a mixed models analysis using LME. I'm preparing a
groupedData plot 
which distinguishes patients according to "patterns" in the missing data.

I used a tapply function as follows

TxBigFile.rle <- tapply(TxBigFile$response,patient.ID,FUN=rle)

My question - what is the most efficient way to convert  TxBigFile.rle to  a

dataframe which includes the output of the "rle" ($length, $values -AND- the
patient.ID)?






Chris Barker, Ph.D.
Principal Pharmacoeconomic Statistician
Roche Pharma Business - Palo Alto
(650)-852-3152

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

home help back first fref pref prev next nref lref last post