complete.cases2: Find complete cases/rows of data.frame with respect to a set...

Description Usage Arguments Details Value Author(s)

View source: R/merge_utils.R

Description

Find complete cases/rows of data.frame with respect to a set of variables.

Usage

1

Arguments

...

A comma seperated list of arguments indicating which variables to consider. The arguments may be character strings, character vectors or formula objects.

df

A data.frame containing the data to be checked for complete cases.

Details

The row numbers of 'df' for which there are no missing values in any of the columns indicated by '...' are returned. The arguments passed in '...' may be character strings, character vectors or formula objects. For formula objects all variables on both left and right hand side of the formula are used. For character strings and vectors the variables whose names are given by those strings are used. Variable transformations may also be used in the arguments, however it doesn't seem to work for the 'diff' transformation (though 'lag' works), and I can't see how to easily fix this.

Value

A logical vector indicating which rows of df have no missing values for the variables passed in '...' Note: currently this doesn't work for formulas which specify instruments (i.e. containing a | symbol)

Author(s)

Ben Veal


vapniks/mergeutils documentation built on May 3, 2019, 4:33 p.m.