Преглед изворни кода

Create a basic shiny app with a typing area

shiny-input
Garrick Aden-Buie пре 6 година
родитељ
комит
ff3a962f7e
2 измењених фајлова са 34 додато и 0 уклоњено
  1. +12
    -0
      inst/shiny-input-app/app.R
  2. +22
    -0
      inst/shiny-input-app/dev-shiny-input.Rmd

+ 12
- 0
inst/shiny-input-app/app.R Прегледај датотеку

library(shiny)

ui <- fluidPage(
textAreaInput("typing", "Type here..."),
verbatimTextOutput("debug")
)

server <- function(input, output, session) {
output$debug <- renderPrint(input$typing)
}

shinyApp(ui, server)

+ 22
- 0
inst/shiny-input-app/dev-shiny-input.Rmd Прегледај датотеку



## Setup a folder for our app inside the frappeCharts package ## Setup a folder for our app inside the frappeCharts package


`r github_sha_link("2188781657884a743c2c4f94dc1fa7755a7de261")`

Create the directory `inst/shiny-input-app` and add `app.R` and `typing.js`. Create the directory `inst/shiny-input-app` and add `app.R` and `typing.js`.


```{r} ```{r}
file.create("inst/shiny-input-app/typing.js") file.create("inst/shiny-input-app/typing.js")
``` ```


## Create a basic Shiny app with a typing area

We'll start with typical Shiny inputs.

```r
library(shiny)

ui <- fluidPage(
textAreaInput("typing", "Type here..."),
verbatimTextOutput("debug")
)

server <- function(input, output, session) {
output$debug <- renderPrint(input$typing)
}

shinyApp(ui, server)
```

Run this app and type in the box.

Loading…
Откажи
Сачувај