| To: | "'s-news@lists.biostat.wustl.edu'" <s-news@lists.biostat.wustl.edu> |
|---|---|
| Subject: | derive intervals a subject is taken the same dose |
| From: | "Stuyckens, Kim [PRDBE]" <KSTUYCK1@PRDBE.JNJ.COM> |
| Date: | Wed, 21 Jun 2006 16:35:39 +0200 |
|
Dear S-News users, I have a dataset which looks as follows containing thousands of rows:
a _data.frame(ID = c(1 ,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,3,3,3,3,3),
My problem is that I would like to find the dosing time intervals that a certain ID(subject in this case) takes the same dose. Mind that the same dose can return within the same ID at a later point in time. The desired result looks as follows ID DOSE STARTDATE ENDDATE
I solved this problem until now with a loop to look for the moment when dose is changing, but I hope there is a more efficient way because the loop is taking to much time and gives memory problems with the amount of data I have. Any input or suggestions are very much appreciated BTW I am using SPLUS 6.2 in a Windows environment Thanks in advance,
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: intersection of 2 dataframes ['Watchdog': checked], Paul Matthias Diderichsen |
|---|---|
| Next by Date: | Re: derive intervals a subject is taken the same dose, Tony Plate |
| Previous by Thread: | intersection of 2 dataframes, jdakin |
| Next by Thread: | Re: derive intervals a subject is taken the same dose, Tony Plate |
| Indexes: | [Date] [Thread] [Top] [All Lists] |