【发布时间】:2019-05-21 02:47:50
【问题描述】:
我正在尝试为 shinyApp 编写代码,在其中我选择一个响应变量(只有一个选择框),然后在复选框中选择我想要的所有协变量。此外,我想指定我的响应变量(高斯、泊松、二项式等)的分布族。我不知道在主面板和服务器中写什么。有人可以帮我吗?
library(shiny)
library(plotly)
data(iris)
ui<-fluidPage(
titlePanel("Regression"),
sidebarPanel(
selectInput("var",label="Choose the response variable:",choice=names(iris), selectize=FALSE),
tags$hr(),
checkboxGroupInput(inputId ="ind_var",label = "Select at least two independent variables:", choices = names(iris)),
mainPanel(
)
)
)
server<-function(input,output){
}
shinyApp(ui, server)
【问题讨论】:
-
现在很难说。你想在主面板中显示什么?你想让服务器做什么?服务器是您进行计算的地方——它们是什么?