Skip to content

How to convert a 3 dimensional List to make a table with tables tabular()?

2 messages · Beckstrand, Janis, NCOD, Duncan Murdoch

#
On 13-11-18 3:46 PM, Beckstrand, Janis, NCOD wrote:
The arguments to tabular are in the wrong order.  You need to give the 
formula first or name it as "table".  So

tabular(L2 ~ L1*variable, data=statslow.d)

would not give an error, but it probably doesn't do what you want, 
because you don't specify a statistic, so it will default to a count. 
You could use the "mean" function, e.g.

tabular(L2 ~ L1*variable*Heading()*mean, data=statslow.d)

(The Heading() will suppress the column label "mean".)  There are 
examples in the vignette that do fancy formatting of multiple columns, 
so it would be possible to write the interval as [.224, .228] for instance.

Duncan Murdoch