使用Shiny从index.html输入表单

时间:2014-04-16 16:08:38

标签: javascript r input shiny

我正在尝试使用index.html从用户那里获取日期和时间,我遇到了一些问题。 数小时作为index.html的数字

<input type="number" name="var">

以后

 Output Text
<pre id="text1" class="shiny-text-output"></pre>

然后在server.R

data <- reactive({ 
...
dist(input$var)
})

output$text1 <- renderText({
  paste("You have selected", input$var)
})

在index.html中显示输入的数字。 但是当我用数字

替换数字输入类型时
<input type="date" name="var">

什么都没有显示出来。

我是否认为这一切都错了?你能给我的任何帮助,或者只是指出我正确的方向,都会很棒。

这个问题似乎接近Button submit R with shiny,但是&#34; date&#34;看起来不像是自定义输入。

1 个答案:

答案 0 :(得分:0)

datenumber不是输入类型。您需要使用text类型。