From cde26045d933ecf64460d2ffb7a54324b156f930 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 27 Feb 2026 04:07:40 +0000 Subject: [PATCH] docs: AI-generated doc upgrade for `renderCytoscapeNetwork` Auto-generated by weekly doc workflow. Target: R/cytoscapeNetwork.R::renderCytoscapeNetwork Date: 2026-02-27T04:07:40Z --- R/cytoscapeNetwork.R | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/R/cytoscapeNetwork.R b/R/cytoscapeNetwork.R index 149ca72..095f957 100644 --- a/R/cytoscapeNetwork.R +++ b/R/cytoscapeNetwork.R @@ -1,3 +1,4 @@ +```r # R/cytoscapeNetwork.R # # htmlwidgets binding for the Cytoscape network visualisation. @@ -490,8 +491,44 @@ cytoscapeNetworkOutput <- function(outputId, ) } -#' Shiny render binding for cytoscapeNetwork -#' @inheritParams htmlwidgets::shinyRenderWidget +#' Render a Cytoscape network in a Shiny application +#' +#' This function is used to render a Cytoscape network visualization within a Shiny application. +#' +#' @param expr \code{expression} that generates a Cytoscape network widget. +#' @param env \code{environment} in which to evaluate \code{expr}. Defaults to \code{parent.frame()}. +#' @param quoted \code{logical}, is \code{expr} a quoted expression (with \code{quote()})? Default is \code{FALSE}. +#' +#' @return A rendered Cytoscape network widget for use in Shiny applications. +#' +#' @examples +#' \dontrun{ +#' library(shiny) +#' library(MSstatsBioNet) +#' +#' ui <- fluidPage( +#' cytoscapeNetworkOutput("cytoNetwork") +#' ) +#' +#' server <- function(input, output, session) { +#' output$cytoNetwork <- renderCytoscapeNetwork({ +#' nodes <- data.frame( +#' id = c("TP53", "MDM2", "CDKN1A"), +#' logFC = c(1.5, -0.8, 2.1), +#' stringsAsFactors = FALSE +#' ) +#' edges <- data.frame( +#' source = c("TP53", "MDM2"), +#' target = c("MDM2", "TP53"), +#' interaction = c("Activation", "Inhibition"), +#' stringsAsFactors = FALSE +#' ) +#' cytoscapeNetwork(nodes, edges) +#' }) +#' } +#' +#' shinyApp(ui, server) +#' } #' @export renderCytoscapeNetwork <- function(expr, env = parent.frame(), quoted = FALSE) { if (!quoted) expr <- substitute(expr) @@ -502,3 +539,4 @@ renderCytoscapeNetwork <- function(expr, env = parent.frame(), quoted = FALSE) { quoted = TRUE ) } +``` \ No newline at end of file