モジュールからアプリケーションサーバーへの入力を取得しようとしています。ここShiny:モジュールからの入力を受け取ります
は、app.R私が何をしたいの例です:
library(shiny)
source("test.R")
ui <- fluidPage(
tabPanel("tt", testUI("t"))
)
server <- function(input, output) {
ret <- callModule(test, "testm")
print(ret)
}
shinyApp(ui = ui, server = server)
テストモジュール:
testUI <- function(id) {
ns <- NS(id)
tabPanel(NULL,
textInput(ns("textInput1"), label = h5(""), value = "")
)}
test <- function(input, output, session, data) {
reactive({input$textInput1})
}
私は、アプリケーションのサーバ機能からtextInput1の内容を印刷したいです.Rとそれを観察する。
タンク、今では動作します! – Grundoc