html - 使用 RShiny 进行降价:全球环境的输入
问题描述
我想在输入中向用户询问一个数字,并在多个输出中使用它,以及在 HTML-Markdown 上的独立块中使用它。这意味着我想使用例如:
ui <- fluidPage(
# "Number of Simulations"
numericInput(inputId = "n",label = "Number of Simulations",
value = 100000,min = 1,max = 200000)
)
# Define server logic required to draw a histogram
server <- function(input, output) {
}
# Run the application
shinyApp(ui = ui, server = server)
然后input$n
在 ShinyApp 之外使用。有什么办法吗?也许我试图弄清楚的一种方法是:
ui <- fluidPage(
# "Number of Simulations"
numericInput(inputId = "n",label = "Number of Simulations",
value = 100000,min = 1,max = 200000)
)
# Define server logic required to draw a histogram
server <- function(input, output) {
reactive({
setwd("C:/Users/alarc/OneDrive/Escritorio/Experimento")
save(input$n,file = "brl.RData")
})
}
# Run the application
shinyApp(ui = ui, server = server)
但它不起作用。就像闪亮的应用程序无法读取该save
功能一样。
解决方案
推荐阅读
- visual-studio - Visual Studio C++“计算代码指标”不起作用
- google-sheets - 条件格式以检查填写电子表格时的错误
- java - “IDENTITY_INSERT”设置为 OFF NETBEANS SQL
- plantuml - Plantuml 中的嵌套 if 语句
- redmine - FreeIPA 中 LDAP 用户的 EasyRedmine 登录失败
- prolog - Prolog:存在量化
- python - 为 GitLab 发布创建资产
- javascript - v8 对象中“快速”、“可内联”属性的数量限制是多少?
- flutter - 如何将依赖于另一个流的流映射到依赖于两个流的新模型?
- node.js - Gitlab-ci.yml 在尝试获取邮递员/纽曼报告时失败:纽曼:找不到“”记者