1
我正在尋找允許用戶輸入他們有興趣上傳的文件的數量,然後讓用戶界面做出反應,以提供許多文件輸入按鈕。如何允許從R用戶的動態數量的文件輸入?
我不確定如何做到這一點。即使一旦完成,我也不確定如何最好地處理這種動態變量。
#ui.R
shinyUI(fluidPage(
titlePanel("Upload your files"),
fluidRow(
column(3, wellPanel(
numericInput("user_num_2",
label = h4("Number of Old Files"),
value = 1)
)),
column(4, wellPanel(
# This outputs the dynamic UI component
uiOutput("ui1")
))
),
fluidRow(
column(3, wellPanel(
numericInput("user_num_2",
label = h4("Number of New Files"),
value = 1)
)),
column(4, wellPanel(
# This outputs the dynamic UI component
uiOutput("ui2")
))
),
fluidRow(
column(3, wellPanel(
selectInput("input_type",
label = h4("Geography Assignment"),
c("Zip", "County", "Zip-County", "Custom Assignment"
)
)
))
)
))
因此,用戶可以輸入他們想要的文件上傳按鈕的數量。這個想法是將它們合併在一起。 multiple
選項不起作用,因爲這些文件可能位於不同的位置。
你應該包括一個你想要實現的重複例子。 – MLavoie
一個最小的閃亮的代碼將是有用的,但問題是足夠清晰IMO。 – Dason
@MLavoie我希望你沒有找到這個論點,但是如果我有能力做到這一點,我就不需要尋求幫助。 – Reck