[R] Constant value in an interval

2009-06-18 Thread Katschke, Adrian R
I am calling on the R-help crew once again. The CD4Per for each subject should be the same for each subject based on a 90 day window either side of the known value. For example, ID 2931 should have a CD4Per of 36 at 0, 34, and 62 DaysEnrolled. Any ideas how to do this without a loop? ID

[R] Create a time interval from a single time variable

2009-06-03 Thread Katschke, Adrian R
I am trying to set up a data set for a survival analysis with time-varying covariates. The data is already in a long format, but does not have a variable to signify the stopping point for the interval. The variable DaysEnrolled is the variable I would like to use to form this interval. This is w

[R] Create a time interval from a single time variable

2009-06-03 Thread Katschke, Adrian R
I am trying to set up a data set for a survival analysis with time-varying covariates. The data is already in a long format, but does not have a variable to signify the stopping point for the interval. The variable DaysEnrolled is the variable I would like to use to form this interval. This is w