1

I applied this code earlier and the results were not totally upto the expectations as the matching_probability section did not show the colour tiles. I couldn't add the image otherwise I would have shown.

formattable(df, 
            align = c("l","c","c","c","c","c","r"), 
            list(`Locus_number` = formatter(
                "span", style = ~ style(color = "grey",font.weight = "bold")), 
                `PIC`= color_tile(customGreen, customGreen0),
                `Matchin_Probability`= color_tile('white', 'orange'),
                `Power_of_Discrimination`= color_tile(customGreen, customGreen0),
                `Power_of_Exclusion`= color_tile(customGreen, customGreen0),
                `Paternity_Index` = color_bar(customRed)
            ))
Martin Gal
  • 16,640
  • 5
  • 21
  • 39

1 Answers1

0

i Had the same issue in the past , probably you have some inf values in the specific column just replace it with 0 or NA

df[mapply(is.infinite, df)] <- NA
user3600910
  • 2,839
  • 4
  • 22
  • 36