drop_na_at: Drop missing values at columns that match a given pattern

Description Usage Arguments Value Examples

View source: R/drop_na_at.R

Description

Provides a simple yet efficient way to drop missing values("NA"s) at columns that match a given pattern.

Usage

1
2
3
4
5
6
7
drop_na_at(
  df,
  pattern_type = "contains",
  pattern = NULL,
  case_sensitive = FALSE,
  ...
)

Arguments

df

A data.frame object

pattern_type

One of "contains", "ends_with" or "starts_with"

pattern

The type of pattern to use when matching the pattern_type. The pattern is case sensitive

case_sensitive

Defaults to FALSE. Patterns are case insensitive if TRUE

...

Other params to other methods

Value

A data.frame object containing only columns that match the given pattern with the missing values removed.

Examples

1
head(drop_na_at(airquality,pattern_type = "starts_with","O"))

mde documentation built on Feb. 10, 2022, 5:08 p.m.

Related to drop_na_at in mde...