title: Length of vector contains input from textInput widget
body: <p>I have a complete R script which will do all calculations on captured (readline()) numbers, however I want to create application with user interface and I stuck at the beginning.</p>
  
  <p>I am new in Shiny and I have a problem with simple calculation of the length of the vector caputred by inputText() widget. The problem is that regardless of the content of the vector, the result of the length function is always 1.</p>
  
  <p>Thank you for help in advance.</p>
  
  <p><strong>ui.R - File</strong></p>
  
  <pre><code>library(shiny)
  
  shinyUI(fluidPage(
  
    titlePanel("Number App"),
  
    sidebarLayout(
      sidebarPanel("This is sidebar panel",
                   textInput("number", "Number:", value=""),
                   submitButton(text = "Submit Number", icon = NULL)
      ),
      mainPanel("This is main panel",
                textOutput("text1")
      )
    )
  )) 
  </code></pre>
  
  <p><strong>server.R</strong></p>
  
  <pre><code>library(shiny)
  
  shinyServer(function(input, output) {
    x &lt;- reactive(as.numeric(input$number))
    y &lt;- reactive(strsplit(as.character(x()), ""))
    z &lt;- reactive(length(y()))
  
    output$text1 &lt;- renderText({
      paste("Captured Number:", x(), "Splitted Number:", y(), "Length of Number: ",  z())
    }) 
  })
  </code></pre>