r - 我在这个闪亮的仪表板 UI 代码中缺少什么?
问题描述
好的,所以我正在为一门课程开发一个闪亮的仪表板项目,它只是没有点击,我已经与工作人员交谈并完成并提出了建议的更正,关于它,它仍然没有点击。我不断收到错误消息,即存在未使用的参数,然后它将我的整个代码复制回给我。
所以项目开始了,我得到了这个基地
# Application Layout
shinyUI(
fluidPage(
br(),
# TASK 1: Application title
...,
p("Explore the difference between people who earn less than 50K and more than 50K. You can filter the data by country, then explore various demogrphic information."),
# TASK 2: Add first fluidRow to select input for country
fluidRow(
column(12,
wellPanel(...) # add select input
)
),
# TASK 3: Add second fluidRow to control how to plot the continuous variables
fluidRow(
column(3,
wellPanel(
p("Select a continuous variable and graph type (histogram or boxplot) to view on the right."),
..., # add radio buttons for continuous variables
... # add radio buttons for chart type
)
),
column(9, ...) # add plot output
),
# TASK 4: Add third fluidRow to control how to plot the categorical variables
fluidRow(
column(3,
wellPanel(
p("Select a categorical variable to view bar chart on the right. Use the check box to view a stacked bar chart to combine the income levels into one graph. "),
..., # add radio buttons for categorical variables
... # add check box input for stacked bar chart option
)
),
column(9, ...) # add plot output
)
)
)
我已经做到了这一点
# Application Layout
shinyUI(
fluidPage(
br(),
# TASK 1: Application title
titlePanel(title = "Expectancy by Country"),
p("Explore the difference between people who earn less than 50K and more than 50K. You can filter the data by country, then explore various demogrphic information.")),
# TASK 2: Add first fluidRow to select input for country
fluidRow(
column(12,
wellPanel(selectInput(
"country",
"Select Country",
choices = c("United-States", "Canada", "Mexico", "Germany", "Philippines")
)) # add select input
)
),
# TASK 3: Add second fluidRow to control how to plot the continuous variables
fluidRow(
column(3,
wellPanel(
p("Select a continuous variable and graph type (histogram or boxplot) to view on the right."),
radioButtons("continous_variable",
"Variable",
choices = c("age", "hours_per_week")), # add radio buttons for continuous variables
radioButtons("graph_type",
"Select Graph Style",
choices = c("histogram", "boxplot")) # add radio buttons for chart type
)
),
column(9, "p1") # add plot output
),
# TASK 4: Add third fluidRow to control how to plot the categorical variables
fluidRow(
column(3,
wellPanel(
p("Select a categorical variable to view bar chart on the right. Use the check box to view a stacked bar chart to combine the income levels into one graph. "),
radioButtons("categorical_variables",
"factors",
choices = c("education", "workclass", "sex")), # add radio buttons for categorical variables
checkboxInput("is_stacked", "select", value = FALSE, width = NULL) # add check box input for stacked bar chart option
)
),
column(9, plotOutput("p2")) # add plot output
)
)
**** 就在这里,原始代码显示了第三个右括号,但每当我把它放进去时,我都会立即收到错误警报,我不知道为什么。
解决方案
推荐阅读
- http - HttpClient PostAsync 上的状态代码 500 内部服务器错误
- python - 考虑某些条件,在 Pandas 中进行聚合和分组
- php - Magento 2 使用模板修改和导出文本
- sql - 一列中有多少元素链接到另一列的元素?
- javascript - 我可以在不指定 Alpine.js 中的任何数据的情况下调度事件吗?
- c - 为什么scanf匹配不同的字符串结尾
- node.js - 尝试从后端文件夹中读取图像时出现错误 GET 404(未找到)
- flutter - Flutter:SliverAppBar 禁用滚动
- python-3.x - python类方法没有输出
- python - 我可以在 mayavi 中绘制两个不重叠的等值面吗?