stopif: Stops execution

Description Usage Arguments Examples

View source: R/widgetHelper.R

Description

Stops the execution of a Shiny app, if at least cond contains one TRUE. The function uses validate and need from the library shiny.

Usage

1
stopif(cond, fmt, ...)

Arguments

cond

condition, execution is stopped if any entry is TRUE

fmt

a character vector of format strings for sprintf

...

further values to be passed into fmt. Only logical, integer, real and character vectors are supported.

Examples

1
2
3
4
5
6
## Not run: 
  # Produces an error
  x <- -1
  stopif(x<=0, "x is smaller than %i", 0)

## End(Not run)

sigbertklinke/mmstat documentation built on May 14, 2019, 8:36 a.m.