R/mod_name_of_module1.R

Defines functions mod_name_of_module1_server mod_name_of_module1_ui

#' name_of_module1 UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd 
#'
#' @importFrom shiny NS tagList 
mod_name_of_module1_ui <- function(id){
  ns <- NS(id)
  tagList(
    h2("A plot"),
    plotOutput(ns("plot"))
  )
}
    
#' name_of_module1 Server Functions
#'
#' @noRd 
mod_name_of_module1_server <- function(id){
  moduleServer( id, function(input, output, session){
    ns <- session$ns
    output$plot <- renderPlot({
      x <- random_num()
      plot(iris[,x])
    })
  })
}
    
## To be copied in the UI
# 
    
## To be copied in the server
# 
redisland11/TrackGolem documentation built on Jan. 4, 2022, 12:04 a.m.