我是R语言的新手。在我的应用程序中,我正在使用“ tableOutput”生成一个表。每当用户再次单击“生成”按钮时,我都希望清除或删除表中的行。请帮我。这是我的代码
UI.R
mainPanel(
tableOutput("Table_vf"),
actionButton("GoButtonVendor", "Generate Result"),
)
Server.R
itemForecast_vf = observeEvent(input$GoButtonVendor, {
//Some functionality
values$forecastVendor <- data.frame (
SNo = c(1:length(forecast_data_Date)),
Date = c(forecast_data_Date),
ItemCode = c(forecast_data_itemCodes),
desc1 = c(forecast_data_itemDesc1),
`Point Forecast` = c(forecast_data_pointForecast),
Lo.80 = c(forecast_data_lo80),
Hi.80 = c(forecast_data_hi80),
Lo.95 = c(forecast_data_lo95),
Hi.95 = c(forecast_data_hi95),
Instock_Date = c(forecast_data_instock_date),
Instock_Qty = c(forecast_data_instock_qty),
stringsAsFactors = FALSE
)
})