Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
220 views
in Technique[技术] by (71.8m points)

html - Publishing heatmap created with R and copy/pasting filled color to another word table

To briefly describe the workflow, someone creates blank table that is consistent with company's standards and design style in MS-Word. Then I do statistical procedures and send the HTML or DOCX version of the plain, simple-design table published with Rmd. Then the person simply highlight, then copy and paste the entries in my table to hers, filling in a well-designed table, ready to be sent.

grayed out area being the highlighted area to be copy pasted

grayed out area being the highlighted area to be copy pasted to the pretty table template in another docx file.

However, the new project calls for a need for categorical heatmap table. I tried ggplot + geom_tiles, but this creates image, and it does not look consistent with the overall report.

What I was think of is maybe make a color-filled table with transparent (or same color) font, then copy paste the filled color to a new table, effectively creating a heatmap desired.

I would like to ask if

  1. is it possible to create color-filled table that can be copy/pasted? If it is, any package recommendation? I normally used flextable.
  2. would it retain the color to while copy/pasting to docx, or will it only copy paste the entries?
  3. is there a better, alternative way to do this?

Thank you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...