use html builder for example 2

This commit is contained in:
JJ Allaire
2012-07-19 08:44:35 -07:00
parent 7e3f704285
commit 0e129379e9
4 changed files with 60 additions and 16 deletions

View File

@@ -2,12 +2,9 @@ library(shiny)
client <- clientPage(
textInput("val",
label = "Input:",
value = "Hello, World!",
labelOnTop = TRUE),
textInput("val", caption = "Input:", initialValue = "Hello, World!"),
p("You said:"), shinyText("valUpper")
textOutput("valUpper", caption = "You said:")
)
server <- function(input, output) {

View File

@@ -1,7 +1,17 @@
library(shiny)
library(digest)
app <- function(input, output) {
client <- clientPage(
textInput("input1", caption="Input:", initialValue="Hello, world!"),
checkboxInput("addnewline", caption = "Append newline", initialValue=TRUE),
textOutput("md5_hash", caption = "MD5:"),
textOutput("sha1_hash", caption = "SHA-1:")
)
server <- function(input, output) {
text <- reactive(function() {
str <- input$input1
if (input$addnewline)
@@ -18,4 +28,4 @@ app <- function(input, output) {
})
}
runApp(client='./www', server=app)
runApp(client, server, port=8500)