drop.na.data {mmodely}R 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))



[Package mmodely version 0.2.5 Index]