https://github.com/hadley/shinysignals
https://github.com/hadley/shinysignals
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hadley/shinysignals
- Owner: hadley
- Created: 2014-09-17T22:14:47.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-09-18T15:16:43.000Z (over 11 years ago)
- Last Synced: 2025-04-14T04:16:53.188Z (9 months ago)
- Language: R
- Size: 129 KB
- Stars: 30
- Watchers: 6
- Forks: 6
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# shinySignals
[](https://travis-ci.org/hadley/shinySignals)
Shiny is a reactive programming framework, but it focusses mainly on the nuts and bolts of generating interactive analysis apps. shinySignals is an attempt to port more functional programming tools that compute on signals (reactives).
Currently, shinySignals only implements the [Signal](http://library.elm-lang.org/catalog/elm-lang-Elm/0.12.3/Signal) and [Time](http://library.elm-lang.org/catalog/elm-lang-Elm/0.12.3/Time) libraries from the [Elm programming language](http://elm-lang.org). It's expected that this package will grow over time to include useful techniques from other FRP frameworks, and to include uniquely R-like features.
## Installation
shinySignals is currently only available on github. Run the following code to install it:
```R
# install.packages("devtools")
devtools::install_github("hadley/shinySignals")
```
## Elm
Compared to the Elm API, the main change is that the key signal always comes first. This leads to a more natural style of composition using `%>%`:
```R
library(shinySignals)
fps(30) %>% count()
step <- reactive({fps(30); sample(c(-1, 0, 1), 1)})
walk <- step %>% reducePast(`+`, 0)
```