【发布时间】:2018-09-20 21:28:07
【问题描述】:
我使用 R shiny 创建了以下界面。
library(shiny)
ui <- fluidPage(
#Can be fluid row also
fluidRow(
column(3,
h3("Excel DB"),
hr(),
fileInput("file1", "Excel DB",
multiple = TRUE,
accept = c("text/csv/xlsx/xls",
"text/comma-separated-values,text/plain",
".csv", ".xls", ".xlsx")),
textInput(inputId = 'Type',label = 'Type'),
textInput(inputId = 'Client',label = 'Client'),
textInput(inputId = "Task", label = "Task"),
actionButton(inputId = "ClearAll", label = "Clear Screen"),
radioButtons("dist", "Vertical Axis Scale",
c("Linear" = "Linear Regression",
"Log" = "Logistic Regression"))
),
column(5,h5(' '),
hr(), downloadButton(outputId = "Downloaddata", label = "Fetch Dataset"),
textInput(inputId = "Commodity", label = "Commodity"),
textInput(inputId = "Year", label = "Year"),
radioButtons("dist", "Horizontal Axis Scale",
c("Linear" = "Linear Regression",
"Log" = "Logistic Regression")),
numericInput(inputId = "Numberinput", label = "Numinput", min = -1000000000, max = 1000000000, value = 0,step = 1)
)
), sliderInput(inputId = "Scale", label = "Scale", min = 0, max = 100, step
= 2.5, value = 1)
)
我创建了以下空服务器
server<-function(input, output){}
shinyApp(ui, server)
上面的代码创建了一个闪亮的应用程序,它的侧边栏面板有两列。但是,2 列彼此不对齐。我想知道如何安排应用程序的组件如下。
获取数据集按钮应位于浏览按钮旁边。同样,商品文本框应该在类型文本框旁边,年份框应该靠近客户端。两组单选按钮应相互对齐。我在这里请求一些帮助。我无法按那种模式排列它们
【问题讨论】: