A function to generate LaTeX output from a dataframe containing covariates and top words.
color_word_table(word_table, covariate_columns = 1, word_columns = 4:13,
min_black = 30, print_first = 60, all_same = FALSE, remove_words = "",
second_table = NULL, max_char_width = 60, bold_covariates = T)
A dataframe with optional covariates and then some number of fields each of which is a top word.
The columns (if any) in the word table(s) that contain covariates which will be printed verbatim.
The columns in the word table(s) that contain the actual words we wish to print.
Defaults to 30 and indicates how light the text for infrequently used words can become.
Defualts to printing the first 40 rows. If set to -1, then all rows will be printed.
If TRUE then the color of all words will be the same and at the maximum value.
A user supplied list of stopwords that should be removed before printing top words.
if not NULL, then two tables are output side by side, following the same formatting and row widths.
This sepcifies the maximum number of characters that can be displayed per line (in order to avoid lines in the table spilling over). Defaults to 60 which is appropriate for the two column PNAS style.
If TRUE then any covariate values provided will be output in bold font to make them easier to distinguish from topic top words.
Concatenates output to the console, no output is returned at present.