describe_na_values: Evaluates a dataframe for NA values.

Description Usage Arguments Value Examples

View source: R/eda.R

Description

Evaluates a dataframe for NA values.

Usage

1
describe_na_values(dataframe)

Arguments

dataframe

the dataframe to be inspected.

Value

a tibble; each column corresponds to the same column in dataframe and each value inside the column is 0 if the corresponding value is NA, 1 otherwise. stops if the object passed in is not a data.frame or tibble.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
df <- data.frame(x = (c(2,3,4)), y= c(1,10,3))
col_num <- describe_na_values(df)

#> # A tibble: 2 x 3
#>       x     y
#>   <int> <int>
#> 1     1     1
#> 2     1     1
#> 3     1     1

df <- data.frame(x = (c(2,NaN,4)), y= c(1,10,3))
col_num <- describe_na_values(df)

#> # A tibble: 2 x 3
#>       x     y
#>   <int> <int>
#> 1     1     1
#> 2     0     1
#> 3     1     1

UBC-MDS/edar documentation built on April 2, 2020, 3:57 a.m.