completeFun: completeFun

Description Usage Arguments Value Note Author(s) Examples

View source: R/completeFun.r

Description

This function removes rows where specific columns have NA, and is a function to return complete rows.

Usage

1
completeFun(data, desiredCols)

Arguments

data

= the matrix/data.frame to be evaluated

desiredCols

= identifier for the column that must have values

Value

result = matrix/data.frame without rows that had NA in the desiredCols

Note

The name is deceptive - MMM did not find it to be fun at all.

Author(s)

Adam Cook, Adam.Cook@dfo-mpo.gc.ca

Examples

1
2
3
4
5
6
7
A = matrix(c(2, NA, 3, 1, 5, 7), nrow=2, ncol=3, byrow = TRUE)
A
[,1] [,2] [,3]
[1,]    2   NA    3
[2,]    1    5    7
completeFun(A, 2)
[1] 1 5 7

Beothuk/bio.utilities documentation built on May 5, 2019, 1:39 p.m.