set-if-na {SeuratObject} | R Documentation |
Set If or If Not NA
Description
Set a default value depending on if an object is NA
Usage
x %NA% y
x %na% y
x %!NA% y
x %!na% y
Arguments
x |
An object to test |
y |
A default value |
Value
For %NA%
: y
if x
is NA
;
otherwise x
For %!NA%
: y
if x
is not
NA
; otherwise x
Examples
# Set if NA
1 %NA% 2
NA %NA% 2
# Set if *not* NA
1 %!NA% 2
NA %!NA% 2
[Package SeuratObject version 5.1.0 Index]