Dennis Fisher
2020-Oct-24 00:28 UTC
[R] Package recommendations for outputting table with cell formatting
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
Patrick (Malone Quantitative)
2020-Oct-24 01:15 UTC
[R] Package recommendations for outputting table with cell formatting
Will this need to be done many times? If not, it might be just as easy to apply conditional formatting to cells after they're already in Excel. On Fri, Oct 23, 2020 at 8:28 PM Dennis Fisher <fisher at 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 at 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.-- Patrick S. Malone, Ph.D., Malone Quantitative NEW Service Models: http://malonequantitative.com He/Him/His
Dennis Fisher
2020-Oct-24 01:35 UTC
[R] Package recommendations for outputting table with cell formatting
Patrick Doing this in Excel is certainly an option. But I would like to learn how to do it in R. Dennis Dennis Fisher MD P < (The "P Less Than" Company) Phone / Fax: 1-866-PLessThan (1-866-753-7784) www.PLessThan.com> On Oct 23, 2020, at 6:15 PM, Patrick (Malone Quantitative) <malone at malonequantitative.com> wrote: > > Will this need to be done many times? If not, it might be just as easy > to apply conditional formatting to cells after they're already in > Excel. > > On Fri, Oct 23, 2020 at 8:28 PM Dennis Fisher <fisher at 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 at 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. > > > > -- > Patrick S. Malone, Ph.D., Malone Quantitative > NEW Service Models: http://malonequantitative.com > > He/Him/His
Jeff Newmiller
2020-Oct-24 01:36 UTC
[R] Package recommendations for outputting table with cell formatting
I would go straight to Word using flextable (table layout) and officer (Word-specific formatting) within an rmarkdown document (e.g. bookdown:: word_document2 to manage overall structure and generate captions). Officer without rmarkdown may be able to generate true Word captions with bookmarks to cross-reference, but it is more tedious to set up than rmarkdown. On October 23, 2020 5:28:26 PM PDT, Dennis Fisher <fisher at 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 at 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.-- Sent from my phone. Please excuse my brevity.
John Kane
2020-Oct-24 03:10 UTC
[R] Package recommendations for outputting table with cell formatting
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 at 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 at 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]]
Richard M. Heiberger
2020-Oct-24 03:24 UTC
[R] [External] Re: Package recommendations for outputting table with cell formatting
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 at 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 at 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 at 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 at 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.
Apparently Analagous Threads
- Package recommendations for outputting table with cell formatting
- Package recommendations for outputting table with cell formatting
- [External] Re: Package recommendations for outputting table with cell formatting
- printing a data.frame without row numbers
- Identifying special characters in a text file