ユーザーに数値入力を求め、その入力に基づいてさらに4つの入力フィールドを生成するダイナミック入力を持つRシャイニーアプリを構築したいと考えています。ここに私が心に留めていることがあります。Rシャイニーダイナミック入力
library(shiny)
# Define UI for random distribution application
shinyUI(fluidPage(
# Application title
titlePanel("Calcs"),
# Sidebar with controls to select the random distribution type
# and number of observations to generate. Note the use of the
# br() element to introduce extra vertical spacing
sidebarLayout(
sidebarPanel(
numericInput("dorr", "How many inputs do you want",4),
i = i+1
while(input$dorr<i){
numericInput("S", "Number of simulations to run:", 10)
i=i+1
}
numericInput("S", "Number of simulations to run:", 10),
actionButton(inputId = "submit_loc",label = "Run the Simulation")
),
mainPanel(
)
)))
私は上記のコードは動作しませんが、それは私の理論的根拠です。私はShinyに条件文があることを知っていますが、あらかじめ指定された数の追加フィールドを生成することができないようです。これも可能ですか?
以下の実施例を参照してください。いくつかの例についてはこのページを参照してください。 –
@warmoverflow私はすでにそれを認識していますが、それを使って動的に事前に指定されたものを作成する方法を理解していません入力数。 – RustyStatistician