completeVecs: Extract the 'complete.cases' for a Set of Vectors

Description Usage Arguments Value Note Author(s) References Examples

View source: R/completeVecs.R

Description

Takes vectors as input and outputs a matrix of the complete cases across these vectors.

Usage

1

Arguments

...

The vectors that need to be combined.

Value

A matrix with the same number of columns as there are input vectors.

Note

Short vectors are recycled without warnings. If your vectors are different lengths, you should decide whether this is a desirable behavior or not before using this function.

Author(s)

Ananda Mahto

References

http://stackoverflow.com/a/20146003/1270695

Examples

1
2
3
4
5
6
7
8
A <- c(12, 8, 11, 9, NA, NA, NA)
B <- c(NA, 7, NA, 10, NA, 11, 9)

completeVecs(A, B)

C <- c(1, 2, NA)

completeVecs(A, B, C)

mrdwab/SOfun documentation built on June 20, 2020, 6:15 p.m.