DataSHIELD implentation of dply::if_else.

ifElseDS(
  condition = NULL,
  true = NULL,
  false = NULL,
  missing = NULL,
  ptype = NULL,
  size = NULL
)

Arguments

condition

A list, specifying a logical vector in tidyverse syntax, ie data and column names unquoted.

true

Vector to use for TRUE value of condition.

false

Vector to use for FALSE value of condition.

missing

If not NULL, will be used as the value for NA values of condition. Follows the same size and type rules as true and false.

ptype

An optional prototype declaring the desired output type. If supplied, this overrides the common type of true, false, and missing.

size

An optional size declaring the desired output size. If supplied, this overrides the size of condition.

Value

A vector with the same size as condition and the same type as the common type of true, false, and missing.