Learn R Programming

DGCA (version 1.0.3)

matNSamp: Find the number of non-missing values.

Description

This function calculates the pairwise number of non-missing values in a matrix.

Usage

matNSamp(matA, impute = FALSE, matB = NULL, secondMat = FALSE)

Value

A number of samples (nsamp) matrix. data(darmanis); darmanis_subset = as.matrix(darmanis[1:30, ]) nsamp_res = matNSamp(darmanis_subset) darmanis_subset[1, 1] = NA nsamp_res_na = matNSamp(darmanis_subset)

Arguments

matA

Input data matrix with numeric entries.

impute

Binary value; if true, indicates that imputation was performed previously, and so checking for NAs is not necessary.

matB

Optional input data matrix with which the comparison with matA will be made.

secondMat

Logical indicator of whether there is a second matrix in the comparison or not.