答案 0 :(得分:3)
我使用列来选择仪表板的大小。我认为问题是因为你在标签$ style中设置了px的大小。 此代码有效
library(shiny)
library(shinythemes)
shinyUI(fluidPage(theme = shinytheme("cerulean"),
#img(src='logo.jpg', align = "right"),
titlePanel("Project1"),
fluidRow(width=12,
sidebarLayout(
column(width=4,
sidebarPanel(
width=12,
radioButtons("source", "Source Type:", c("online", "offline")),
conditionalPanel(
condition = "input.source == 'online'",
selectInput("e_source", "online_Source",
list("Yahoo","CNBC","Others"), selected = "CNBC")),
conditionalPanel(
condition = "input.source == 'offline'",
selectInput("e_source", "offline_Source",
list("Newspaper",
"magazines",
"books"), selected = "books")),
checkboxGroupInput("size",
label = ("aAd size"),
choices = list("Medium", "Large", "small"
), selected = "small"))),
column(width=8,
mainPanel(tabsetPanel("tab",tabPanel("Ad Details", tableOutput("table1"))), width=12))
))))