Making something reactive static again

... Here's what the flow of work is...

  1. Load a csv file. Display the file as a table on the UI. (Reactive and works great.)
  2. "Mutate" the data and show as a different table. (Reactive and works great.)
  3. Pass the function to a different server R file. (Reactive and works great.)
  4. Pass the file through a "tidygraph" command.... (BAD. BAD. BAD.)

The command doesn't like the reactive dataframe. How do I make the data usable (i.e., "static" - for lack of a better word - as a dataframe)?

Please help!

Can you provide a reprex for that ?
Here's a simple example of reactive tidygraph being used in a shiny app

library(shiny)
library(tidygraph)
library(ggraph)
graph_names <- c("Bull",
                 "Levi",
                 "House",
                 "McGee")


ui <- fluidPage(
  selectInput("gchoice",label = "select a graph",
              choices = graph_names),
  plotOutput("pout",width = "600px",height="600px")
)

server <- function(input, output, session) {
  
  my_reactive_graph <- reactive({
    create_notable(req(input$gchoice))
  })
  
  output$pout <- renderPlot({
    req(my_reactive_graph()) |>
    ggraph() + 
      geom_edge_link() + 
      geom_node_point()
  })
}

shinyApp(ui, server)

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.