ibrary(quantmod)
library(shiny)
ui <- fluidPage(
textInput("Stock","Input Stock"),
textInput("Date","Input Start Date"),
textInput("Dateto","Input End Date"),
actionButton("GO","GO"),
tableOutput("table")
)
server <- function(input, output, session){
data <- eventReactive(input$GO,{
req(input$Stock)
getSymbols(input$Stock,src = "yahoo", from=input$Date,to=input$Dateto,auto.assign=F)
})
output$table <- renderTable({
data()
})
}
shinyApp(ui, server)
here is my code for my current r shiny document, it is outputting a data table of the input stock as requested, however how would I go about editing the table 'data' before outputting it , for example adding a column with moving averages inside it