Learn R Programming

car (version 0.8-1)

all.good: Function to Test for Non-Missing Observations

Description

This function finds observations that are non-missing for all of its arguments.

Usage

all.good(...)

Arguments

...
one or more vectors or factors of the same length; may include matrices with the same number of rows.

Value

  • A logical vector with TRUE for observations that are non-missing for all arguments, normally used to index valid observations.

Examples

Run this code
w <- matrix(1:20, 10, 2)
x <- 1:10
y <- factor(rep(c('a', 'b'), 5))
z <- letters[1:10]
w[1,1] <- NA
x[3] <- NA
y[5] <- NA
z[7] <- NA
all.good(w, x, y, z)
##  [1] FALSE  TRUE FALSE  TRUE FALSE  TRUE FALSE  TRUE  TRUE  TRUE

Run the code above in your browser using DataLab