fixNAs: Replace NAs with another value

Description Usage Arguments Value Examples

View source: R/fixNAs.R

Description

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

Usage

1
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

1
         x with no NAs (possibly a sparse Matrix)

Examples

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

biscuiteer documentation built on Nov. 8, 2020, 8:28 p.m.