The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
The goal of react
is to help with reactivity, instead of
calling the foo
reactive expression foo()
you
can call react$foo
similar to how one calls
input$bar
for inputs, or alternatively
react[foo]
or react[foo()]
.
The benefit is that it makes it easier to spot calls to reactive expressions in your server code.
You can install the development version of react from GitHub with:
::pak("tadascience/react") pak
Take this from the shiny example:
<- function(input, output) {
server
<- reactive({
dataInput getSymbols(input$symb, src = "yahoo",
from = input$dates[1],
to = input$dates[2],
auto.assign = FALSE)
})
$plot <- renderPlot({
outputchartSeries(dataInput(), theme = chartTheme("white"),
type = "line", log.scale = input$log, TA = NULL)
})
}
With react
you can rewrite the plot
output
as one of these, depending on your taste.
# react$ is similar conceptually to how input$ works
$plot <- renderPlot({
outputchartSeries(react$dataInput, theme = chartTheme("white"),
type = "line", log.scale = input$log, TA = NULL)
})
# react[]
$plot <- renderPlot({
outputchartSeries(react[dataInput], theme = chartTheme("white"),
type = "line", log.scale = input$log, TA = NULL)
})
# react[()] so that you still have the calling a function feel
# and you just sourround it
$plot <- renderPlot({
outputchartSeries(react[dataInput()], theme = chartTheme("white"),
type = "line", log.scale = input$log, TA = NULL)
})
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.