gt() is remarkably flexible, but I'm having trouble coming up with a way to use color to draw attention to values evaluated row-wise, as opposed to column-wise, which seems straightforward.
My analysis creates a data set with rows of characteristics and columns for tests done over a variable number of years. It's important the data is presented in this format.
What I would like to do is highlight the maximum value in each row, bearing in mind that the number of columns (i.e., the years) can vary from one analysis to the next. In the example below there are 3 years of data, but in another analysis there may be many more.
data.frame( Heading = c("Characteristic 1", "Characteristic 2", "Characteristic 3"), `2012` = c(3, 7, 3), `2013` = c(4, 2, 2), `2014` = c(3, 1, 5), Sum = c(10, 10, 10) ) %>% gt()
Ideally, my output would look something like this:
Any guidance is most appreciated. Thank you