Re: [R] converting a data set to a format for time series analysis

2008-06-11 Thread Ricardo Pietrobon
Jim, it worked perfectly. thanks a lot On Mon, Jun 9, 2008 at 8:58 PM, jim holtman <[EMAIL PROTECTED]> wrote: > This should do it: > >> x <- read.table(textConnection("subject hospitaldate_enrollment >> hospital_beds > + 1 hospitalA 1/3/2002300 > + 2 hospitalA

Re: [R] converting a data set to a format for time series analysis

2008-06-09 Thread jim holtman
This should do it: > x <- read.table(textConnection("subject hospitaldate_enrollment hospital_beds + 1 hospitalA 1/3/2002300 + 2 hospitalA 1/6/2002300 + 3 hospitalB 2/4/2002150 + 4 hospitalC 3/2/2002200"),

Re: [R] converting a data set to a format for time series analysis

2008-06-09 Thread jim holtman
Here is one way of doing it: > x <- read.table(textConnection("subject hospitaldate_enrollment hospital_beds + 1 hospitalA 1/3/2002300 + 2 hospitalA 1/6/2002300 + 3 hospitalB 2/4/2002150 + 4 hospitalC 3/2/2002

Re: [R] converting a data set to a format for time series analysis

2008-06-09 Thread Ricardo Pietrobon
Jim, thanks a lot. This does the trick for dates, but what I have been struggling the most with is actually the conversion from having one subject per row to having one month per row. I didn't explain that well at all in my previous email and so let me try again. The idea is that the current dat

Re: [R] converting a data set to a format for time series analysis

2008-06-09 Thread jim holtman
Will something like this work for you: > x <- read.table(textConnection("subject hospitaldate_enrollment hospital_beds + 1 hospitalA 1/3/2002300 + 2 hospitalA 1/6/2002300 + 3 hospitalB 2/4/2002150 + 4 hospitalC 3/2/200

[R] converting a data set to a format for time series analysis

2008-06-09 Thread Ricardo Pietrobon
I currently have a data set describing human subjects enrolled into an international clinical trial, the name of the hospital enrolling this human subject, the date when the subject was enrolled, and a vector with variables representing characteristics of the site (e.g., number of beds in a hospita