% Generated by roxygen2: do not edit by hand % Please edit documentation in R/methods.R, R/methods_row.R \name{colAnyNAs,dgCMatrix-method} \alias{colAnyNAs,dgCMatrix-method} \alias{rowAnyNAs,dgCMatrix-method} \title{Check if any elements in a row (column) of a matrix-like object is missing} \usage{ \S4method{colAnyNAs}{dgCMatrix}(x, rows = NULL, cols = NULL) \S4method{rowAnyNAs}{dgCMatrix}(x, rows = NULL, cols = NULL) } \arguments{ \item{x}{An NxK matrix-like object.} \item{rows}{A \code{\link{vector}} indicating the subset of rows (and/or columns) to operate over. If \code{\link{NULL}}, no subsetting is done.} \item{cols}{A \code{\link{vector}} indicating the subset of rows (and/or columns) to operate over. If \code{\link{NULL}}, no subsetting is done.} } \value{ Returns a \code{\link{logical}} \code{\link{vector}} of length N (K). } \description{ Check if any elements in a row (column) of a matrix-like object is missing. } \details{ The S4 methods for \code{x} of type \code{\link{matrix}}, \code{\link{array}}, or \code{\link{numeric}} call \code{matrixStats::rowAnyNAs} / \code{matrixStats::colAnyNAs}. } \examples{ mat <- matrix(0, nrow=10, ncol=5) mat[sample(seq_len(5 *10), 5)] <- NA sp_mat <- as(mat, "dgCMatrix") colAnyNAs(sp_mat) } \seealso{ \itemize{ \item \code{matrixStats::\link[matrixStats:anyMissing]{rowAnyNAs}()} and \code{matrixStats::\link[matrixStats:anyMissing]{colAnyNAs}()} which are used when the input is a \code{matrix} or \code{numeric} vector. \item For checks if any element is equal to a value, see \code{\link[MatrixGenerics]{rowAnys}()}. \item \code{base::\link{is.na}()} and \code{base::\link{any}()}. } }