Skip to contents

Handles the server-side logic for the variable input module.

Usage

mod_var_input_server(id)

Arguments

id

(character) Namespace ID for the module.

Value

A reactive expression that returns a list of selected input values:

  • y: Variable for the y-axis.

  • x: Variable for the x-axis.

  • z: Variable for the point colors.

Details

mod_var_input_server() reads user input from the corresponding UI function created with mod_var_input_ui(). It processes and returns a reactive object containing the selected variables.

See also

Other Variable Input Module: mod_var_input_ui()

Examples

if (interactive()) {
  shiny::shinyApp(
    ui = shiny::fluidPage(mod_var_input_ui("vars")),
    server = function(input, output, session) {
      selected_vars <- mod_var_input_server("vars")
      shiny::observe(print(selected_vars()))
    }
  )
}