remove_na: Remove NAs

Description Usage Arguments Value Examples

View source: R/remove_na.R

Description

A helper function to remove any rows where NA values appear in the specified column(s).

Usage

1
remove_na(.data, ..., .verbose = FALSE)

Arguments

.data

A tbl_spark or a data.frame.

...

symbols. The column(s) from which NAs should be removed. If no columns are provided, all NAs will be removed.

.verbose

logical(1). If TRUE, return a message recording the number of rows removed and the number of rows remaining (default: FALSE).

Value

An object of the same type as .data. The output has the following properties:

Examples

1
2
3
4
5
6
7
8
9
# You can remove NAs from a single column
remove_na(airquality, Ozone)

# Or from multiple columns
remove_na(airquality, Ozone, Solar.R)

# By default, the function will remove any rows where NA values
# appear in any column
remove_na(airquality)

nathaneastwood/sparkplugs documentation built on Feb. 28, 2021, 4:57 p.m.