Ifnone: Default for NULL and NA Value

IfnoneR Documentation

Default for NULL and NA Value

Description

Set default value for object, including NULL and NA and length 0.

Usage

x %|||% y

Arguments

x

character/numeric/factor/list. An object which could be checked by is.na().

y

ANY. A default value

Value

%|||%: x unless NULL, NA nor length(x) == 0, otherwise y

Examples

1    %|||% 1
NA   %|||% 1
NULL %|||% 1


HatsuneCode/TrustVDJ documentation built on Aug. 13, 2022, 9:36 p.m.