如何更改R闪亮的SelectInput周围区域的宽度

use*_*875 4 r

我在R中有一个SelectInput,周围有很多空白区域.这是我的ui.r中的选择输入:

library(shiny)
shinyUI(pageWithSidebar(
  headerPanel(GetHeader()),

 sidebarPanel(
    selectInput("date", "Select Date:", GetListOfDays(), width="120px")
    #dateInput("date", "Date:", GetListOfDays() ) #value = "2012-02-29")
  ),

  mainPanel(
   uiOutput("plots")
  )
Run Code Online (Sandbox Code Playgroud)

现在,当我运行报告时,我看到:

在此输入图像描述

您是否看到选择输入左侧的所有空白区域?我该如何修剪或移除它?

谢谢.

mal*_*atr 8

看起来width函数中有一个参数.

library(shiny)
shinyUI(pageWithSidebar(
  headerPanel(GetHeader()),

  sidebarPanel(
    selectInput("date", "Select Date:", GetListOfDays(), width="120px"),
    width = 2 ### EDIT HERE
  ),

  mainPanel(
    uiOutput("plots")
  )
Run Code Online (Sandbox Code Playgroud)