The code works normally in Rstudio, the code is
library(datatable)
library(shiny)
library(magrittr)
datatable(report) %>% formatStyle('status',target = 'row',
backgroundColor = styleEqual(c("Completed","Over run"), c('lightgreen','red')))
However, I don't know how to output this datatable/formattable? in Shiny.
The error says:
no applicable method for 'as.htmlwidget' applied to an object of class "c('datatables', 'htmlwidget')"