[R] Dose Profile

Bert Gunter gunter.berton at gene.com
Tue Oct 28 18:49:19 CET 2008


Why don't you ask your "someone at work" to help, as you appear to have
local resources handy?

-- Bert Gunter 

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Laura Bonnett
Sent: Tuesday, October 28, 2008 9:33 AM
To: r-help at r-project.org
Subject: [R] Dose Profile

Hi Everyone,

I have data in a long format e.g. there is one row per patient but each
follow-up appointment is included in the row.  So, a snippet of the data
looks like this:
      TrialNo Drug Sex Rand Adate1 Date1 Dose1 Time1 Adate2 Date2 Dose2
Time2  B1001029 LTG M 15719 30/04/2003 15825 150 106 29/08/2003 15946 200
227  B1117003 LTG M 15734 30/04/2003 15825 200 91 03/09/2003 15951 250 217
B138015 LTG M 14923 06/02/2001 15012 225 89 08/05/2001 15103 300 180
B112003 TPM F 14914 15/01/2001 14990 60 76 05/03/2001 15039 100 125
Of course, not everyone has the same number of follow-up appointments and so
there may be some column entries that are NAs.

What I'd like to do is a dose profile i.e. a plot of time on the x-axis
agaisnt dose on the y-axis for each patient ideally colouring lines
according to drug.  Does anyone know how I can do this?  Someone at work has
suggested that I use plot and then loess.smooth but I don't really know what
to do.

Thank you very much for your help,

Laura

	[[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list