FreesearchR/reference/cut-variable.md

1.5 KiB

Module to Convert Numeric to Factor

This module contain an interface to cut a numeric into several intervals.

Usage

cut_variable_ui(id)

cut_variable_server(id, data_r = reactive(NULL))

modal_cut_variable(
  id,
  title = i18n$t("Convert Numeric to Factor"),
  easyClose = TRUE,
  size = "l",
  footer = NULL
)

Arguments

  • id:

    Module ID.

  • data_r:

    A shiny::reactive() function returning a data.frame.

  • title:

    An optional title for the dialog.

  • easyClose:

    If TRUE, the modal dialog can be dismissed by clicking outside the dialog box, or be pressing the Escape key. If FALSE (the default), the modal dialog can't be dismissed in those ways; instead it must be dismissed by clicking on a modalButton(), or from a call to removeModal() on the server.

  • size:

    One of "s" for small, "m" (the default) for medium, "l" for large, or "xl" for extra large. Note that "xl" only works with Bootstrap 4 and above (to opt-in to Bootstrap 4+, pass bslib::bs_theme() to the theme argument of a page container like fluidPage()).

  • footer:

    UI for footer. Use NULL for no footer.

Value

A shiny::reactive() function returning the data.