有没有可能在Shiny中使用一些R对象? 例如,在下面的代码中,我想获取用户输入的文本字符串。但是,.Last.value不是所需的文本字符串。 参考 How to store the returned value from a Shiny module in reactiveValues? Ex代码 returnUI = function(id) {
ns <- NS(id)
tagList(
textInput(ns("txt"), "Write something")
)
}
returnServer = functio
我刚刚学习了R闪亮的软件包,为了课程中的一个练习,我们必须创建一个应用程序,它在侧边栏中有两个下拉菜单,在主面板中有一个ggplot2图。
我几乎计算出大部分R代码,但在绘图过程中我得到了错误(object 'input' not found)。有人能指点我哪里做错了吗?
ui.R
library(shiny)
shinyUI(fluidPage(
# Application title
titlePanel("Demonstration of 2 dropdown menus"),
# Sidebar with a slider input
我得到了一个错误:
Error in UseMethod("xtable") :
no applicable method for 'xtable' applied to an object of class "reactive"
UI.R
library(shiny)
shinyUI(pageWithSidebar(
headerPanel("Test App"),
sidebarPanel(
textInput(inputId="text1",
label =