[R] [External] Re: Package recommendations for outputting table with cell formatting

Richard M. Heiberger rmh @end|ng |rom temp|e@edu
Sat Oct 24 05:24:05 CEST 2020


To John and everyone else,

Please add Hmisc::latex to your  how-to-make-beautiful-tables-in-r document.
We first included latex() in S in 1995, and it is still actively
maintained and improved.

Rich

Here are the first few lines of ?latex

Convert an S object to LaTeX, and Related Utilities

Description:

     ‘latex’ converts its argument to a ‘.tex’ file appropriate for
     inclusion in a LaTeX2e document.  ‘latex’ is a generic function
     that calls one of ‘latex.default’, ‘latex.function’, ‘latex.list’.

     ‘latex.default’ does appropriate rounding and decimal alignment
     and produces a file containing a LaTeX tabular environment to
     print the matrix or data.frame ‘x’ as a table.

     ‘latex.function’ prepares an S function for printing by issuing
     ‘sed’ commands that are similar to those in the ‘S.to.latex’
     procedure in the ‘s.to.latex’ package (Chambers and Hastie, 1993).
     ‘latex.function’ can also produce ‘verbatim’ output or output that
     works with the ‘Sweavel’ LaTeX style at <URL:
     http://biostat.mc.vanderbilt.edu/SweaveTemplate>.


On Fri, Oct 23, 2020 at 11:11 PM John Kane <jrkrideau using gmail.com> wrote:
>
> This comes with no guarantee since i have only tried one or two packages
> mentioned but have a look at <a href="
> https://rfortherestofus.com/2019/11/how-to-make-beautiful-tables-in-r/"> R
> Tables</a>.
>
>
> On Fri, 23 Oct 2020 at 20:28, Dennis Fisher <fisher using plessthan.com> wrote:
>
> > R 4.0.2
> > OS X
> >
> > Colleagues
> >
> > I have the unfortunate need to create a large number of tables (destined
> > for a Word document).  I need to color cells depending on the contents,
> > e.g., blue if the value is < 0.5, red if the value is > 1.5.
> > If the output went initially to Excel, that would work; outputting
> > directly to Word would be even better.
> > I expect that several packages can accomplish this.  I am looking for
> > recommendations as to which package (or combination) of packages is best to
> > accomplish this.
> >
> > Dennis
> >
> > Dennis Fisher MD
> > P < (The "P Less Than" Company)
> > Phone / Fax: 1-866-PLessThan (1-866-753-7784)
> > www.PLessThan.com
> >
> > ______________________________________________
> > R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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.
> >
>
>
> --
> John Kane
> Kingston ON Canada
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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