fixNAs {biscuiteer} | R Documentation |
Useful for coercing matrices into how bsseq is expecting the M matrix to be.
fixNAs(x, y = 0, sparseMatrix = FALSE)
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) |
x with no NAs (possibly a sparse Matrix)
nom <- c(rep(c(1,4,NA,9,NA,NA,7,NA), 5)) no_nas <- fixNAs(nom)