wip
parent
675a09411d
commit
c00ae4838d
@ -0,0 +1,26 @@
|
||||
# skeleton for *.R
|
||||
# PURPOSE:
|
||||
# observeEvent: side effect, print to console
|
||||
# USAGE:
|
||||
# interactive
|
||||
|
||||
library(shiny)
|
||||
|
||||
ui <- fluidPage(
|
||||
textInput("name", "What's your name?"),
|
||||
textOutput("greeting")
|
||||
)
|
||||
|
||||
server <- function(input, output, session) {
|
||||
string <- reactive(paste0("Hello ", input$name, "!"))
|
||||
|
||||
output$greeting <- renderText(string())
|
||||
observeEvent(input$name, {
|
||||
message("Greeting performed")
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
shinyApp(ui, server)
|
||||
|
||||
vim:linebreak:nospell:nowrap:cul tw=78 fo=tqlnr foldcolumn=1 cc=+1 filetype=r
|
@ -0,0 +1,8 @@
|
||||
|
||||
|
||||
```{r}
|
||||
|
||||
```
|
||||
|
||||
|
||||
vim:linebreak:nospell:nowrap:cul tw=78 fo=tqlnr foldcolumn=1 cc=+1 filetype=r
|
Loading…
Reference in New Issue