R: Set if 'NA'

set-if-na {SeuratObject} | R Documentation

## Set if `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

    1 %NA% 2
    NA %NA% 2

    1 %!NA% 2
    NA %!NA% 2

[Package SeuratObject version 4.1.0 Index]