removeNAfromCovars: Remove NA values from covariate columns.

View source: R/analysisFuns.R

removeNAfromCovarsR Documentation

Remove NA values from covariate columns.

Description

Function for removing missing values from columns of a data.frame or data.table. Must pass in the data to remove missing values from and a character vector of covariate names that correspond to column names in the data. Only observations from these columns are removed.

Usage

removeNAfromCovars(dat, covars)

Arguments

dat

Data.table or data.frame to remove missing values from.

covars

Character vector, the column names to look and remove missing observations from.

Value

Data.table with missing observations removed from specified columns.


paulhegedus/OFPE documentation built on Nov. 23, 2022, 5:09 a.m.