remove_missing_row_column: Removes Rows and Columns with Excessive Missing Values from a Matrix.
remove_missing_row_column.RdThis function processes a matrix, typically the output from `make_design_matrix`, by removing rows and columns that have a high percentage of missing values (`NA`). The function allows for flexibility in the order of operations, either removing rows first or columns first.
Arguments
- M
A matrix, typically the output from `make_design_matrix`, where rows represent SNPs, columns represent tissue-gene pairs, and values are z-scores.
- rowthres
A numeric threshold (between 0 and 1). Rows with a proportion of missing values greater than this threshold will be removed.
- colthres
A numeric threshold (between 0 and 1). Columns with a proportion of missing values greater than this threshold will be removed.
- rowfirst
A logical value. If `TRUE`, rows are processed before columns. If `FALSE`, columns are processed before rows.