Hello,
Well, after David’s first office hours where he covered parameterized reporting, I’ve taken on the task myself with great success!
After some feedback from colleagues, I’ve been asked to apply some conditional formatting to indicate high and low performance flags in my tables.
I have attached a Word mockup of what I’m hoping to perform in Markdown. The second column indicates the conditional formatting I’ve been asked to add. I am knitting to Word from Markdown using the flextable and officer packages.
I’m wondering if anyone could suggest how I might implement a color scheme of >= 75% (blue), 50-74% (yellow), and < 50% (red)? Is it possible to have colored flags appear in the adjacent cells? Note that the formatting is based only on the value in the “program agree” column, not “department agree”.
I also note that percentage values are stored as characters. For example, the values in the rds file I imported into markdown are stored as single characters (i.e. “78% (n=45)” is an entry for a single cell). It seems this could make conditional formatting in Markdown somewhat more difficult. Would it be better to import numeric values into Markdown (i.e. “.78”?)
Any insights or suggestions on this would be greatly appreciated.
Thank you!