Dear R-listers I am writing a manuscript for a scientific journal in clinical medicine. I have three groups of patients, and I present a 10*3 table of their characteristics in Table 1. Some of their characteristics, e.g. their age, are on a continuous scale, others are dichotomous. I am thinking of presenting the age distribution in each group as miniature graphs, each of which must fit in one table cell. I am hoping that someone can answer these questions: 1. Has anybody ever seen something like this published anywhere? 2. Should I draw the entire table as a figure, or should I make a table in Word (or similar) and manually insert the graphs in their cells? 3. Are there R packages that can "draw tables"? 4. And one for you editors out there: Would such a table count as one figure, several figures, or a table?! Forgive me for being somewhat off-topic. I hope for your help anyway. Best regards, Peter. [[alternative HTML version deleted]]
Hello,> I am writing a manuscript for a scientific journal in clinical medicine. > I have three groups of patients, and I present a 10*3 table of their > characteristics in Table 1. Some of their characteristics, e.g. their > age, are on a continuous scale, others are dichotomous. I am thinking of > presenting the age distribution in each group as miniature graphs, each > of which must fit in one table cell. I am hoping that someone can answer > these questions: > > > > 1. Has anybody ever seen something like this published anywhere? > > 2. Should I draw the entire table as a figure, or should I make a table > in Word (or similar) and manually insert the graphs in their cells? >Depending on your needs, there's another solution. You could output LaTeX, and compile that to a PDF. The first thing I thought of when I read your topic was the "describe" function in Hmisc. The help file for ?describe references http://biostat.mc.vanderbilt.edu/twiki/pub/Main/Hmisc/counties.pdf Probably not exactly what you're looking for, but it might be start. See also: http://texblog.wordpress.com/2008/02/04/placing-graphicsimages-inside-a-table/ I would probably go this route, generating code to produce a LaTeX table and the associated image files. I've also used low-level grid graphics function calls (e.g., grid.text ) to produce 'tables' with hazard ratio type graphics included as a column. (a 'forest plot'). Hope that helps, Erik
Hi, On 12 April 2010 22:07, Peter Jepsen <PJ at dce.au.dk> wrote:> > 3. Are there R packages that can "draw tables"?the gplots package has a textplot() function, and the gridExtra package a tableGrob(), http://rwiki.sciviews.org/doku.php?id=tips:graphics-grid:table In theory it should be possible to adapt the latter to allow the placement of a (preferably lattice / ggplot2 / Grid) graphic in the desired cells. HTH, baptiste
On 04/13/2010 06:07 AM, Peter Jepsen wrote:> Dear R-listers > > > > I am writing a manuscript for a scientific journal in clinical medicine. > I have three groups of patients, and I present a 10*3 table of their > characteristics in Table 1. Some of their characteristics, e.g. their > age, are on a continuous scale, others are dichotomous. I am thinking of > presenting the age distribution in each group as miniature graphs, each > of which must fit in one table cell. I am hoping that someone can answer > these questions: > > > > 1. Has anybody ever seen something like this published anywhere? > > 2. Should I draw the entire table as a figure, or should I make a table > in Word (or similar) and manually insert the graphs in their cells? > > 3. Are there R packages that can "draw tables"? > > 4. And one for you editors out there: Would such a table count as one > figure, several figures, or a table?! > > > > Forgive me for being somewhat off-topic. I hope for your help anyway. >Hi Peter, This sounds like Edward Tufte's "sparklines" and I think there was a discussion of this sort of graphic a couple of years ago. Yep, see: http://finzi.psych.upenn.edu/R/Rhelp02/archive/76508.html Jim