0
私の機能の使い方を簡単にするために少し光沢のあるアプリを設定したいと思っています。だから私は使いたい機能が光沢のあるファイルアップロード、機能に参加する
create_rating <- function(data_path, x, y, z)
入力されString, int, int int
出力がmatrix
library(shiny)
library(NLP)
create_rating <- function(data_path, x, y, z){}
ui <- fluidPage(
titlePanel("Review"),
sidebarLayout(
sidebarPanel(
fileInput("file1", "Choose .txt File",
accept=c("text/csv",
"text/comma-separated-values,text/plain")),
actionButton("update", "Upload!"),
hr(),
numericInput("good", "3* Rating",15),
numericInput("ok", "2* Rating",8),
numericInput("bad", "1* Rating",3)
),
mainPanel(
h4("Review"),
tableOutput("result_shiny")
)
)
)
server <- function(input, output) {
inFile <- reactive({input$file1})
if(is.null(inFile()))
return(NULL)
x <- reactive({input$good})
y <- reactive({input$ok})
z <- reactive({input$bad})
result <- reactive({
input$update
withProgress({
setProgress(message = "Processing review...")
physical_check(as.String(path), x(), y(), z())
})
})
output$result_shiny <- renderTable({result()})
}
# Run the application
shinyApp(ui = ui, server = server)
であるそれからそれは、ウィンドウを開き、レイアウトフィットが、それは、処理通知のすべての時間を示しているといません結果。
またはI
server <- function(input, output) {
output$result_shiny <- eventReactive(input$update,{
inFile <- reactive({input$file1})
x <- reactive({input$good})
y <- reactive({input$ok})
z <- reactive({input$bad})
resultat <- reactive({
withProgress({
setProgress(message = "Processing review...")
physical_check(as.String(inFile()$datapath), x(), y(), z())
})
})
})
}
のようなサーバーの一部を試みたが、この機能で、それはウィンドウを開き、私はまた、何も処理通知を、ファイルを選択していないアップロードボタンと何をプッシュすることができます。
ありがとうございます!
ありがとう、うまくいきます。私は確信が持てませんが、シャイニーがなぜ私の試みを受け入れていないのですか? –