Updated as follows ,
ui.R
library(shiny)
shinyUI(pageWithSidebar(headerPanel("Quantmod Plot"),
sidebarPanel(
textInput("stock_name", "Enter Stock Name:", "AAPL"),
submitButton("Submit")
),
mainPanel(tabPanel("Plot", plotOutput("plot")))
))
------------------------------
server.R
library(shiny)
library(quantmod)
shinyServer(function(input, output){
abc <- reactive({ abc <- getSymbols(input$stock_name,
src = "yahoo",from = as.Date("2010-01-01"), to = as.Date("2014-01-01")) })
output$plot <- renderPlot({ chartSeries(abc) })
})
----------------------------
Now the error is
chartSeries requires an xtsible object