library(shiny)
library(cyjShiny)
Create the cyjShiny instance, with all default parameters (portRange, quiet, title). Javascript and HTML is loaded into your browser, cytoscape.js is initialized, a websocket connection between your R process and that web page is constructed, over which subsequent commands and data will travel.
> networks <- c("",
+ "tiny" = "simple/smallDemo.cyjs",
+ "galFiltered" = "galFiltered/galFiltered.cyjs")
>
> ui = shinyUI(fluidPage(
+
+ tags$style("#cyjShiny{height:95vh !important;}"),
+ sidebarLayout(
+ sidebarPanel(
+ selectInput("loadNetworkFile", "Select Network: ", choices=networks)
+ ),
+ mainPanel(cyjShinyOutput('cyjShiny'), width=10),
+ fluid=FALSE
+ ) # sidebarLayout
+ ))
>
> server = function(input, output, session){
+
+ observeEvent(input$loadNetworkFile, ignoreInit=TRUE, {
+ print(" select network file")
+ })
+ }
> app <- shinyApp(ui = ui, server = server)
> app