na_all: Determine if all values are missing

Description Usage Arguments Details Value See Also Examples

View source: R/na_all.R

Description

Determines if any of the values in a data structure are missing

Usage

1
2
3
4
5
6
7
8
9
na_all(x)

## Default S3 method:
na_all(x)

## S3 method for class 'data.frame'
na_all(x)

all_na(x)

Arguments

x

any object

Details

Implemented as: .

For data.frames:

.

That is, reports if any columns are have all na's. This may change.

all_na is a copy of na_all.

all

Value

logical

logical

See Also

na_any
na_which

Examples

1
2
3
4
5
6
7
8
9
  na_all( c( NA, NA, 1 ) ) # FALSE
  na_all( c( NA, NA, NA ) )   # TRUE
  
  df <- data.frame( char = rep(NA_character_, 3), nums=1:3)
  na_all(df)  # FALSE
  
  df <- data.frame( char = rep(NA_character_, 3), nums=rep(NA_real_,3))
  na_all(df)  # TRUE
  

decisionpatterns/na.actions documentation built on Aug. 25, 2020, 8:04 p.m.