[R] grid.table and expression in table body?

baptiste Auguié baptiste.auguie at googlemail.com
Wed Aug 4 16:47:12 CEST 2010


I added a parse argument to grid.table so that when switched to TRUE (default FALSE) all the text strings are interpreted as expressions (inspired by ggplot2::geom_text),

d <- data.frame("alpha", "beta")
grid.table(d, parse=T)

you'll need revision 258 of gridExtra for this to work (googlecode now, r-forge in the following days, CRAN in the next stable version).

HTH,

baptiste

On Aug 4, 2010, at 9:56 AM, Johannes Graumann wrote:

> Hi Baptiste,
> 
> This is, I fear a bit beyond my level of competency ... What I want to be able 
> to do is things like put "<2.2%*%10^{-16}" in a table cell, who's name I can 
> already set to "p[Wilcoxon]" ...
> 
> Joh
> 
> On Wednesday 04 August 2010 09:15:43 you wrote:
>> Hi,
>> 
>> I don't know the answer to your question (how to make a data.frame with
>> expressions), but if you have a list of expressions you could try the
>> following,
>> 
>> http://code.google.com/p/gridextra/wiki/testExpressions
>> 
>> I'm open to suggestions for your original query (what is the best way to do
>> it – parse each string and coerce it as an expression?)
>> 
>> HTH,
>> 
>> baptiste
>> 
>> On Aug 4, 2010, at 12:05 AM, Johannes Graumann wrote:
>>> Hi,
>>> 
>>> Is there any way to get an expression into a data.frame, such that
>>> "grid.table" from "gridExtra" will plot it evaluated in the table body?
>>> The docu does it for the header, but is the body possible?
>>> 
>>> Thanks, Joh
>>> 
>>> ______________________________________________
>>> R-help at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide
>>> http://www.R-project.org/posting-guide.html and provide commented,
>>> minimal, self-contained, reproducible code.



More information about the R-help mailing list