I have a dataset:
ID Value
102 306
41 800
101 783
105 193
myID 334
I would like to make it datatable, where only the row with "myID" is orange and the rest of the table is blue. Looking at helper functions and other examples , it seems like I should use styleEqual. However, I do not know what the values ββin my other lines, and also they will change dynamically.
I tried to use
datatable(tableData) %>%
formatStyle(0, target= 'row',color = 'black', backgroundColor = tableColour,
lineHeight='70%', padding = '3px 3px', fontSize = '80%') %>%
formatStyle('ID', target = 'row',
backgroundColor = styleEqual(c("myID"), c('orange')))
However, this does not work - the entire table is blue, and the second instruction is formatStyleignored. If I delete the first formatStyle, I get the line in orange, but all other formatting lose. Is there a way to use styleEqual to determine, for example. c("myID", "All other IDs"), or is there another workaround?