remove_NA_rows: Removes rows with more than thresh NA's from matrix

View source: R/utilities.R

remove_NA_rowsR Documentation

Removes rows with more than thresh NA's from matrix

Description

Removes rows with more than thresh NA's from matrix

Usage

remove_NA_rows(obj, thresh = 0)

Arguments

obj

matrix or dataframe

thresh

- maximum number of NA's / row - if more the row will be removed

Value

matrix

See Also

Other utilities: INTERNAL_FUNCTIONS_BY_FAMILY, get_UniprotID_from_fasta_header(), matrix_to_tibble(), multigroup_volcano(), names_to_matrix(), pairs_smooth(), pairs_w_abline(), panel_cor(), panel_hist(), table_facade()

Examples


obj = matrix(rnorm(10*10),ncol=10)
dim(obj)
obj[3,3] = NA
x1 = remove_NA_rows(obj, thresh=0)
stopifnot(all(c(9,10)==dim(x1)))
x2 = remove_NA_rows(obj, thresh=1)
stopifnot(all(c(10,10)==dim(x2)))


wolski/prolfqua documentation built on Dec. 4, 2024, 11:18 p.m.