r - 未找到 ShinySurveys 对象“输出”
问题描述
真的很喜欢 shinysurveys 包,但似乎无法轻松地将问题从演示集更改为自定义集……关于如何成功更改问题的任何想法?
小标题
library(tidyverse)
library(shiny)
library(shinysurveys)
df <- tibble(question = c("What the name of the project?",
"How would you describe the project? Be as Brief as possible"),
option = c("Your Answer",
"Description"),
input_type = c("text",
"Description"),
input_id = c("project_name",
"project_description"),
dependence = c(NA,
NA),
dependence_value = c(NA,
NA),
required = c(F,
F)
) %>%
bind_rows(
tibble(
question = "What is the stage of the project?",
# First multiple choice responses ---------
option = c("Zone1",
"Zone2",
"Zone3",
"Active"),
input_type = "mc",
input_id = "project_stage",
dependence = NA,
dependence_value = NA,
required = F
)
)
用户界面
ui <- fluidPage(
surveyOutput(df = df,
survey_title = "Survey Test for lite project management application",
survey_description = "This is a test survey for a lite file management application")
)
服务器
server <- function(input, output, session) {
renderSurvey(df <- df)
observeEvent(input$submit, {
showModal(modalDialog(
title = "Congrats, you completed your first shinysurvey!",
"You can customize what actions happen when a user finishes a survey using input$submit."
))
})
}
shinyApp(ui, server)
错误消息始终是 ui 中的“dots_list(...) 中的错误:找不到对象‘输出’”。我不确定我所做的与此处的演示有何不同... https://www.jdtrat.com/packages/shinysurveys/index.html。我认为,额外的眼睛将解决我遇到的问题。
我尝试将 tibble 更改为 data.frame,但没有骰子......任何其他想法和想法都会非常有帮助。
解决方案
感谢 Johannes Stötzer 的评论。这确实是我遇到的问题。
推荐阅读
- ruby-on-rails - 传递一个 id 来创建评论
- c# - ASP.NET Core - Let's Encrypt - 创建证书时安全包中没有可用的凭据
- c - 冒泡排序,但仅对偶数放置的数字进行排序,并将奇数放置的元素留在c中
- sql - 有没有办法在不复制该组织的情况下实现具有多种类型的组织?
- swift - SwiftUI 1.0:核心数据错误 - 数据未保存
- php - 卷曲等到超时再继续
- redis - 是否可以在一次操作中从 Redis 中的哈希中获取和删除某些内容?
- linkerd - 我可以将 Envoy 与 Linkerd 一起使用吗?
- python - [Python3]如何使用 Seaborn/Matplotlib 绘制 pandas 数据框
- apache-camel - 为什么 ProducerTemplate 的方法 sendBody 在集成测试中没有返回?