filter.na: Filter out the observations/features that contains the NA...

Description Usage Arguments Details Value Examples

View source: R/filter.na.R

Description

Tells whether the data input contains any NA values, and filter out the NA values by user's specification - namely, either row or columne.

Usage

1
filter.na(x, direction)

Arguments

x

The dataframe needs to be checked.

direction

user specify how the NA observations should be deleted, by "row" or "col".

Details

Filter out the observations/features that contains the NA values within data frame, if none missing data found in the inputted data frame, return the data frame back.

Value

A list with the first elemenet indicating whether ther is any missing values in the dataframe, second element indicating the dataset with NA values omitted.

Examples

1
2
3
m <- as.data.frame(cbind(c(1,2,1), c(2,2,NA)))
filter.na(m, direction = "col")
filter.na(m, direction = "row")$FilteredData

zxkathy/powers documentation built on Dec. 7, 2017, 8:29 p.m.