Output and render functions for using oncoplot() within Shiny applications
and interactive R Markdown / Quarto documents.
Usage
oncoplotOutput(output_id, width = "100%", height = "560px")
renderOncoplot(expr, env = parent.frame(), quoted = FALSE)Arguments
- output_id
Output variable to read from.
- width, height
Element size, passed to
htmlwidgets::shinyWidgetOutput().- expr
An expression that generates an
oncoplot()widget.- env
The environment in which to evaluate
expr.- quoted
Is
expralready quoted? Defaults toFALSE.
Value
oncoplotOutput() returns a Shiny output UI element;
renderOncoplot() returns a Shiny render function.
Examples
if (interactive() && requireNamespace("shiny", quietly = TRUE)) {
ui <- fluidPage(oncoplotOutput("onco"))
server <- function(input, output) {
output$onco <- renderOncoplot({
oncoplot(data.frame(
gene = c("TP53", "KRAS"), sample = c("S1", "S2"),
class = "missense"
))
})
}
shinyApp(ui, server)
}