View source: R/color.flextable.R
color.flextable | R Documentation |
create colored flextable from input dataframe and write to ms word
color.flextable( x, colFields = NA, colRows = NA, cols = colorRamps::blue2red(40)[10:40], breaks = NA, breaksType = c("quantile", "equal"), outDocx = NA, preview = T, digits = 0, return = T, by.row = F, by.col = F )
x |
input data.frame |
colFields |
numeric fields to color |
colRows |
choose a subset of rows (numbers or row ids) to color |
cols |
sequence of colors as from colorRamps::blue2red(40) |
breaks |
(optional) sequence of break values to use in slicing x into colors |
breaksType |
(optional) if breaks = NA, then use either quantile or equal interval breaks |
outDocx |
(optional) provide location to write flex table as word document |
preview |
should a temporary word document with flex table be opened |
digits |
how many digits should be retained (round) for numeric values |
return |
T/F should a flextable be returned? |
This program is free software but it is provided WITHOUT WARRANTY and with ABSOLUTELY NO GUARANTEE of fitness or functionality for any purpose; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Revision History
1.0 | 7/7/2020 function created |
1.1 | date and revisions.. |
1.2 | add row / column options |
NULL or a flex table if return == T
Jacob Strunk <Jacob.strunk@usda.gov>
print.flextable
flextable
quantile
save_as_docx
<Delete and Replace>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.