[R] Plotting patient drug timelines using ggplot2 (or some other means) -- Help!!!

David Winsemius dwinsemius at comcast.net
Fri Mar 23 19:23:30 CET 2012

On Mar 23, 2012, at 2:15 PM, Paul Miller wrote:

> Hi Michael and Petr,
> Apologize for my failure to grasp what you were saying. My code is  
> up and running now.
> Noticed what might be a shortcoming of my ggplot code. I have some  
> instances where a drug starts and stops and then starts and stops  
> again. It looks like my graphs show just a single unbroken line  
> segment though.

Put in NA entries at times you do not want plotted. Not sure exactly  
how that gets handled in ggplot but since plotting nothing was the  
"usual" behavior in base and lattice graphics, I would think that  
would have gotten carried over.

> I ordered Hadley Wickham's ggplot2 book earlier today. So hopefully  
> I'll be able to figure that out myself once the book arrives.
> Thank you Michael, Petr, and Bert for your help with this. Thanks  
> especially to Michael for patiently answering all my questions over  
> the last day or so.
> Paul

David Winsemius, MD
West Hartford, CT

More information about the R-help mailing list