This function calculates the pairwise number of non-missing values in a matrix.
matNSamp(matA, impute = FALSE, matB = NULL, secondMat = FALSE)
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)
Input data matrix with numeric entries.
Binary value; if true, indicates that imputation was performed previously, and so checking for NAs is not necessary.
Optional input data matrix with which the comparison with matA will be made.
Logical indicator of whether there is a second matrix in the comparison or not.