Learn R Programming

multifunc (version 0.9.4)

whichVars: whichVars

Description

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

Usage

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.

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab