checkpoint: Shiny feedback messages

View source: R/checkpoint.R

checkpointR Documentation

Shiny feedback messages

Description

Wrapper around shiny::req() and shiny::showNotification(). Prevents application from crashing and displays guiding message about what the user is supposed to do in order to continue without this message to appear.

Usage

checkpoint(
  evaluate = TRUE,
  case_false = NULL,
  error_notifications = list(no_name = "Could not save. Please enter a valid name",
    insufficient_n_vertices = "Please determine at least three vertices.",
    insufficient_n_vertices2 =
    "Please determine at least two vertices and highlight the trajectory.",
    invalid_segment_name = "Please enter a valid name for the segment.",
    segment_name_not_found = "Could not find the specified segment.",
    occupied_segment_name = "This segment name is already taken.",
    occupied_trajectory_name = "This trajectory name is already taken.",
    invalid_trajectory_name = "Please enter a valid name for the trajectory.",     
    insufficient_n_genes = "Please determine at least two genes.", invalid_gs_string1 =
    "The class-prefix must not contain '_'.", invalid_gs_string2 =
    "Please enter a valid string for the class-prefix and the gene-set name.",
    occupied_gs_name = "This gene-set name is already taken."),
  warning_notifications = list(),
  duration = 4,
  stop_process = TRUE,
  stop_app = FALSE
)

Arguments

evaluate

A vector of logical tests to be evaluated.

case_false

A character string indicating the message to be displayed if one element of evaluate turns out to be FALSE. Needs to be in base::names(error/warning_notifiations).

error_notifications

A named list of character strings.

warning_notifications

A named list of character strings.

duration

The duration the message is displayed.

stop_process, stop_app

Logical. What is supposed to happen if one element of evaluate turns out to be FALSE.

Value

A shiny notification.


kueckelj/SPATA documentation built on March 22, 2022, 9:59 p.m.