tl;dr
- reactivity is a beast
- javascript isn’t cheating
- there are already a ton of shiny features … and more on the way
reactivity
output$plot = renderPlot()
is not an imperative to the browser to do a what … it’s a recipe for how the browser should do something.
Shiny ‘render’ functions (e.g. renderPlot()
, renderText()
, etc) inherently depend on reactivity. What the point above emphasizes is that assignments to a reactive expression are not the same as assignments made in “regular” R programming. Reactive outputs depend on inputs, and subsequently change as those inputs are manipulated.
If you want to watch how those changes happen in your own app, try adding options(shiny.reactlog=TRUE)
to the top of your server script. When you run the app in a browser and press COMMAND + F3
(or CTRL + F3
on Windows) you’ll see a force directed network that outlines the connections between inputs and outputs.
Another way to implement reactivity is with the reactive()
function.
For my …read more
Source:: r-bloggers.com