闪亮的app错误的单选按钮

时间:2018-01-20 11:50:48

标签: r shiny shiny-server

我制作了一个闪亮的代码,可以从用户那里获取输入并在x = excel文件中保存答案。当我在问题列表中添加单选按钮代码行(注释)时,我收到错误。为什么错误以及可以采取哪些措施来解决它?

install.packages("devtools")
install.packages("digest")
install.packages("shiny")
devtools::install_github("daattali/shinyforms")
library(shiny)
library(shinyforms)

questions <- list(
  list(id = "name", type = "text", title = "Name", mandatory = TRUE),
  list(id = "age", type = "numeric", title = "Age", mandatory = TRUE),
  list(id = "Income", title = "Your average annual income from all sources before tax (e.g. Pension, employment, investments, etc.) is", type = "text", mandatory = TRUE),
  list(id = "saving", type = "text", title = "You regularly save the following percentage of your income for special expenditures, such as education, mortgage lump sum repayments, retirement, etc", mandatory = TRUE),
  list(id = "continue", title = "You expect your current income level (at a minimum) to continue for the:", type = "text", mandatory = TRUE),
  list(id = "status", type = "text", title = "You would describe your financial situation as being:", mandatory = TRUE),
#radioButtons("gender", label = ("select the Gender"),choices = list("Male" = 1, "Female" = 2),selected = 1),
  list(id = "correct", type = "checkbox", title = "I have given correct answers")
   )
formInfo <- list(
  id = "basicinfo",
  questions = questions,

  storage = list(
    # Right now, only flat file storage is supported
    type = STORAGE_TYPES$FLATFILE,
    # The path where responses are stored
    path = "D:\\CP\\responses\\"
  )
)


ui <- fluidPage(
  #titlePanel("Registation Form"),
  formUI(formInfo)
)

server <- function(input, output, session) {
  formServer(formInfo)
}

shinyApp(ui = ui, server = server)

错误:运行ui&lt; - fluidPage

时出现以下错误

if(在%fieldsMandatory中的问题$ id%){:参数的错误 零长度

0 个答案:

没有答案