0

I have a shiny app where I load pins in global.R with pins::pin_read() and then use the data frames for further wrangling as necessary in server.R, like I would in any R script.

Now I want to make these pins reactive using pins::pin_reactive_read(), however, I don't understand how to access the data in server.R now. Below is what it looks like currently:

global.R

board <- pins::board_register_rsconnect(
  key = Sys.getenv("CONNECT_API_KEY"), 
  server = Sys.getenv("CONNECT_SERVER")
)

example_pin <- pins::pin_read(board, "user/pin")

server.R

 shinyServer(function(input, output, session) {
df <- example_pin %>%
select(...)
}

What do I need to change in order to access the data in server.R while having it automatically update as soon as the pin changes using pins::pin_reactive_read?

fahans
  • 27
  • 5

0 Answers0