fixNAs {biscuiteer} | R Documentation

## Replace NAs with another value

### Description

Useful for coercing matrices into how bsseq is expecting the M matrix to be.

### Usage

    fixNAs(x, y = 0, sparseMatrix = FALSE)

### Arguments

`x` | The matrix-like object containing NAs to fix
`y` | The value to replace the NAs with (DEFAULT: 0)
`sparseMatrix` | Make the result a Matrix object? (DEFAULT: FALSE)

### Value

             x with no NAs (possibly a sparse Matrix)

### Examples

      nom <- c(rep(c(1,4,NA,9,NA,NA,7,NA), 5))
      no_nas <- fixNAs(nom)

[Package biscuiteer version 1.1.0 Index]