whichVars takes a data frame and the names of a set of columns and returns the names of those columns that do not have an excessive fraction of NA values

whichVars(a.df, vars = NA, thresh = 2/3)

Arguments

a.df

A data frame

vars

The names of the columns that contain data of interest

thresh

The fraction of NA values in a column that is acceptable

Value

A vector of column names

Details

This is a helper function for data processing.

Author

Jarrett Byrnes.

Examples

data(all_biodepth)
allVars <- qw(biomassY3, root3, N.g.m2, light3, N.Soil, wood3, cotton3)

germany <- subset(all_biodepth, all_biodepth$location == "Germany")

vars <- whichVars(germany, allVars)