错误:Shiny(R)中未使用的参数

Dan*_*lls 5 r shiny

我想首先修改一个基本的闪亮示例应用程序的一些组件,但我不断收到此错误:

ERROR: unused arguments (fluidRow(column(4, tags$hr(),
 verbatimTextOutput("out1"), selectInput("in1", "Options", choices =
 state.name, multiple = TRUE, selectize = FALSE))), fluidRow(column(4,
 tags$hr(), verbatimTextOutput("out2"), selectInput("in2", "Options",
 choices = state.name, multiple = TRUE, selectize = FALSE))))
Run Code Online (Sandbox Code Playgroud)

这是我的代码:

ui.R

library(shiny)
library(shinythemes)

shinyUI(fluidPage(theme=shinytheme("flatly"),
  #Application Title
  headerPanel("States"),
  br(),
  fluidRow(
    column(4, 
           tags$h4("Choose One or Multiple States"))
  )),
  fluidRow(
    column(4,
           tags$hr(),
           verbatimTextOutput('out1'),
           selectInput('in1', 'Options', choices = state.name, multiple = TRUE, selectize = FALSE)
           )
  ),
  fluidRow(
    column(4,
           tags$hr(),
           verbatimTextOutput('out2'),
           selectInput('in2', 'Options', choices= state.name, multiple = TRUE, selectize = FALSE))
  ))
Run Code Online (Sandbox Code Playgroud)

===============================================

server.R

sessionInfo()
install.packages("shiny")
library(shiny)

View(headcount)
attach(headcount)
headcount.crn=as.array(CRN)


shinyServer(function (input, output, session) {
  output$out1 <- renderPrint(input$in1)
  output$out2 <- renderPrint(input$in2)
  })
Run Code Online (Sandbox Code Playgroud)

Dea*_*ali 5

该错误通常意味着您将逗号或方括号弄乱了。您的情况是,第一个结尾的括号())过多fluidRowfluidPage导致过早关闭