test.na: Test NA values

Description Usage Arguments Examples

View source: R/tests.R

Description

Tests if the vector/column contains any NA values

Usage

1
2
## S3 method for class 'na'
test(setup, df, ...)

Arguments

setup

the setup class

df

the dataframe

...

other arguments passed to the function

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
df <- data.frame(x = 1:4, y = c(NA, 6:8))
setup <- setup_test_na("df_name", "x") 
test <- test(setup, df)
## test$test_result returns TRUE

setup <- setup_test_na("df_name", "y") 
test <- test(setup, df)
## test$test_result returns FALSE

## End(Not run)

holmesjoli/validR documentation built on Dec. 1, 2019, 12:38 p.m.