Output and render functions for using TnT within Shiny applications and interactive Rmd documents.

TnTOutput(outputId, width = "100%", height = "auto")

renderTnT(expr, env = parent.frame(), quoted = FALSE)

Arguments

outputId

output variable to read from

width, height

Must be a valid CSS unit (like '100%', '400px', 'auto') or a number, which will be coerced to a string and have 'px' appended.

expr

An expression that generates a TnTBoard/TnTGenome object.

env

The environment in which to evaluate expr.

quoted

Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.

Value

An output or render function that enables the use of the converted htmlwidget within Shiny applications.

Examples

library(shiny)
#> #> Attaching package: ‘shiny’
#> The following object is masked from ‘package:TnT’: #> #> validate
ui <- fluidPage(fluidRow( column(width = 2, { "A Simple Example Here" }), column(width = 10, { TnTOutput("out") }) )) server <- function (input, output) { re.btrack <- reactive({ gr <- GRanges("chr12", IRanges(100, 1000)) BlockTrack(gr) }) output$out <- renderTnT({ TnTBoard(re.btrack()) }) }
# NOT RUN { shinyApp(ui = ui, server = server) # }