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

Description Usage Arguments Value Examples

View source: R/removeNArows.R

Description

Removes rows with more than thresh NA's from matrix

Usage

1
removeNArows(obj, thresh = 0)

Arguments

obj

matrix or dataframe

thresh

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

Value

matrix

Examples

1
2
3
4
5
6
7
obj = matrix(rnorm(10*10),ncol=10)
dim(obj)
obj[3,3] = NA
x1 = removeNArows(obj, thresh=0)
stopifnot(all(c(9,10)==dim(x1)))
x2 = removeNArows(obj, thresh=1)
stopifnot(all(c(10,10)==dim(x2)))

protViz/quantable documentation built on Nov. 29, 2021, 10:07 a.m.