Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

noNAs

Succinctly select complete rows from a dataframe


Description

Succinctly select complete rows from a dataframe.

Usage

noNAs(df, rows = NULL, cols = NULL, drop = TRUE)

Arguments

df

an data.frame() to select on

rows

Rows to keep (optional, incomplete rows still discarded)

cols

Cols to keep

drop

Whether to return a vector when only 1 column is selected (default TRUE)

Value

  • Complete rows and (optionally) selected columns

See Also

Examples

tmp = mtcars
tmp[2,1] = NA
noNAs(tmp, cols="mpg")
noNAs(tmp, cols="mpg", drop = FALSE)
noNAs(tmp) # no Mazda RX4 Wag

umx

Structural Equation Modeling and Twin Modeling in R

v4.10.10
GPL-3
Authors
Timothy C. Bates [aut, cre] (<https://orcid.org/0000-0002-1153-9007>), Gillespie Nathan [wit], Michael Zakharin [wit], Brenton Wiernik [ctb], Joshua N. Pritikin [ctb], Michael C. Neale [ctb], Hermine Maes [ctb]
Initial release
2021-11-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.