繁体   English   中英

sidebarLayout参数

[英]sidebarLayout Argument

我在sidebarLayout中遇到以下错误:以下脚本缺少参数“ mainPanel”,没有默认值:

library(shiny)
shinyUI(fluidPage(
titlePanel(title = "Pig breeding trends by country"),
sidebarLayout(
      sidebarPanel(
             mainPanel("2000 to 2010"),
             sliderInput(inputId = "year",
                         label = "year by year count:",
                         min = 2000, max = 2010,
                         value = 1)
                        )
                )
       )
)

我检查了其他线程,这似乎是因为mainPanel不在sidebarLayout中,但是我已经检查了它并放在了括号内,现在不确定该怎么做。

这将工作:

shinyUI(
  fluidPage(
    titlePanel(title = "Pig breeding trends by country"), 
    sidebarLayout(
      sidebarPanel(
        sliderInput(inputId = "year", 
                    label = "year by year count:", 
                    min = 2000, 
                    max = 2010, 
                    value = 1) ),
      mainPanel())))

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM