binarise: Derive zero-or-one binary variable

Description Usage Arguments Value Author(s)

View source: R/pgx.R

Description

Convenience function to derive a zero-or-one binary vector from two logical vectors.

Usage

1
binarise(is0, is1)

Arguments

is0

a logical vector

is1

a logical vector of same length as is0

Value

Returns a vector of 0/1/NA of the same length as the input arguments, with 0 when is0 is TRUE and is1 is FALSE, 1 when is1 is TRUE and is0 is FALSE, and NA otherwise.

Author(s)

Toby Johnson Toby.x.Johnson@gsk.com


tobyjohnson/gtx documentation built on Aug. 30, 2019, 8:07 p.m.