[R] Drawing schematics
mark at wardle.org
Fri May 29 12:10:00 CEST 2009
Hi. Have you looked at graphviz?
I have previously used R to generate graphviz diagrams. I create a
template graphviz diagram and then use R to parse this template,
substitute appropriate values and then outputto a temporary file. I
then use a system() call to run graphviz on thisoutputted intermediary
file to generate a PDF which is then incorporated into a report using
Sweave. There is an Rgraphviz package, but I simply used a system()
I use RODBC to extract data directly from my research databases.
I've used it to generate pretty publication-quality graphs showing
patient recruitment, drop-outs etc., with patient numbers updated
every time it is run!
Hope this helps,
2009/5/29 George Chen <glchen at stanford.edu>:
> I would like to represent the treatment course of a subject with an arrow representing passage through time and various ticks, arrows, or bars representing treatments done to the patient along the arrow. I would like to generate this sort of schematic for each patient in a database taking information from the database such as time of treatment and type of treatment.
> Does anybody know how I can do this? Is there a premade R package for this sort of thing or should I try to make a new graphics function? If a new graphics function, where could I start?
> Thanks in advance.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Dr. Mark Wardle
Specialist registrar, Neurology
More information about the R-help