access a variable defined in shiny from a sourced script

I have a script shiny.R
a<-1
server(source(script.R))
Then I have
script.R
print(a)
it doesn't work because he doesn't know "a", how to correct this?

Use source(script.R, local = TRUE)

1 Like

This topic was automatically closed 90 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.