I have a datatable which i want to customise based on the row names and the values present in the rows.
Customizing the color of the datables is generally done by the column names, but not the row names.
Below is my dataframe.
df <- data.frame(`1st`=c(100, 39, 5.6),
`2nd`=c(200, 70, 5.9),
`3rd`=c(230, 100, 6.3),
`4th`=c(300, 98, 7.0))
rownames(df) <- c("Bins", "Accuracy", "SubYeild")
In my case, if you look at the third row ie SubmissionYield, i want the cell of that particular row to be green if it is greater then 6 or else red in color. Is there any way to achieve this?