R/drawSankey.R

Defines functions renderdrawSanky drawSankeyOutput drawSankey

drawSankey <- function(data) {
  
  x <- rjson::toJSON(data)
  
  # create the widget
  htmlwidgets::createWidget("sigma", x, width = "100%", height = "400px")
}

drawSankeyOutput <- function(outputId, width = "100%", height = "400px") {
  shinyWidgetOutput(outputId, "sigma", width, height, package = "sigma")
}

renderdrawSanky <- function(expr, env = parent.frame(), quoted = FALSE) {
  if (!quoted) { expr <- substitute(expr) } # force quoted
  shinyRenderWidget(expr, sigmaOutput, env, quoted = TRUE)
}
mi-erasmusmc/AssociationRuleMining documentation built on Oct. 26, 2021, 1:31 a.m.