drop.na.data: Drop any rows with NA values

View source: R/missing.data.R

drop.na.dataR Documentation

Drop any rows with NA values

Description

This function takes a dataframe as input and removes any rows that have NA as values.

Usage

drop.na.data(df, vars=names(df))

Arguments

df

a dataframe

vars

sub set of variable (column) names to use in searching for missing values

Value

A subset of 'df' that only has non-missing values in the columns specified by 'vars'

Examples


path <- system.file("extdata","primate-example.data.csv", package="mmodely")
data <- read.csv(path, row.names=1)

df.nona <- drop.na.data(data, vars=names(df))



mmodely documentation built on May 31, 2023, 6:47 p.m.