check_inputs: Check shiny inputs

Description Usage Arguments Examples

View source: R/FUN.R

Description

Reject an invalid error (custom class error) if any R expression is false also use shinytoastr & shinyFeedback to alert user

Usage

1
check_inputs(inputs, exprs, msgs)

Arguments

inputs

vector of character(s) representing name(s) of the input(s)

exprs

vector of boolean(s) or vector of R expression(s) which return boolean

msgs

vector of string, message(s) to show to the user

Examples

1
2
3
4
## Not run: check_inputs(c("tol", "units"), 
     c(input$tol >= 0, input$units %in% c("mda", "ppm")), 
     c("Tolerance must be positive", "mDa or ppm unit only supported"))
## End(Not run)

shutinet/metabSeek documentation built on Sept. 5, 2020, 12:57 a.m.