Dear Duncan,

On Tue, Apr 23, 2013 at 2:13 PM, Duncan Murdoch
<murdoch.dun...@gmail.com> wrote:
> I've done this now, in version 0.7.54 on R-forge.  To leave out the rows
> with N=0, you can select a subset of the table where N (the first column) is
> non-zero:
>
> tab <- tabular(((p=factor(p))*(a=factor(a))+1) ~ (N = 1) + (b +
> c)*(mean+sd),data=q)
>
> tab[ tab[,1] > 0, ]
>
> and it produces this:
>
>
>          b           c
>  p a   N  mean  sd    mean sd
>  A 1   10 16.20 3.458 56.3 10.155
>    3   10 13.60 2.119 58.1  8.075
>  B 2   10 14.40 2.547 51.2  9.438
>    All 30 14.73 2.888 55.2  9.419
>
> Indexing of tables isn't as general as indexing of matrices, but most of the
> simple forms should work.  I haven't tested yet, but I expect this will be
> fine in LaTeX or HTML (also new, not on CRAN yet) output as well.
>
Thank you so much for adding this. I've installed 0.7.54 and it seems
to work as advertised. The LaTeX output looks flawless, too.

Regards,
Liviu

______________________________________________
R-help@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.

Reply via email to