Wie füge ich eine neue Zeile hinzu, um die Daten in shiny @ hochzulade
Ich möchte grundlegende Funktionen für die Produktionsplanung entwerfen. Hauptsächlich versuche ich glänzend zu machen, was ich in Excel mache. Ich habe eine Datei, die vom Benutzer hochgeladen wurde. Der Benutzer sollte dann eine neue Menge einstellen, die den Lagerbestand verringert. -an einem Tag mehrere Anpassungen- * Der Tag wird vom Systemdatum übernommen. * Die neuen Zeilen sollten angezeigt werden. Hier sind die Beispieldaten:http: //www.filedropper.com/data2_
library(shiny)
shinyServer(function(input, output) {
output$table1 <- renderTable({
if (is.null(input$file1))
return(NULL)
read.csv(input$file1$datapath, header=TRUE, sep=";",
quote='')
})
addData <- observe({
if(input$action > 0) {
f (is.null(input$file1))
return(NULL)
read.csv(input$file1$datapath, header=TRUE, sep=";",
quote='')
`uploadedfile1` <- read.csv(input$file1$datapath, sep=";")
uploadedfile2 <- uploadedfile1
safetystock <- 585
ne,wLine <- isolate(c(Sys.Date(), "provided by file", input$spotQuantity, inventory, safetystock, Location2))
isolate(uploadedfile2Plot <- rbind(as.matrix(uploadedfile2), unlist(newLine)))
uploadedfile2 Plot
}
})
})
shinyUI(fluidPage(
sidebarLayout(
sidebarPanel(
fileInput('file1', 'Choose File', accept=c('text/csv', 'text/comma-separated-values,text/plain', '.csv')),
numericInput("Quantity", "Enter Quantity",value=0),
actionButton("action","Confirm")
),
# Show a plot of the generated distribution
mainPanel(
tableOutput("table1")
)
)
))