I am trying to pass a simple integer to a Shiny Flexdashboard. But I can for some reason only to it staticly, but I'd rather have it reactivly;
aggregated_static <- readRDS( "../rdsdata/aggregated_static.rds")
k <- nrow(aggregated_static)
That piece of code passes the number of rows to my Shiny dash, where it can be accessed with;
item_lines = k
But, if I do it this way, it won't work, telling me I can't access reactive content from that spot;
set_aggregated <- reactiveFileReader(1000, session, "./rdsdata/set_aggregated.rds", readRDS)
k <- nrow(aggregated_static())
Operation not allowed without an active reactive context. (You tried to do something that can only be done from inside a reactive expression or observer.)
Now I've tried using Isolate, creating a function enclosing that with reactive({}), but I am simply nog getting that value passed. Is there a way to do this?