Skip to contents

This function checks for empty cols in a given data frame and returns a list with the check result and a message.

Usage

check_empty_cols(df, filename = NULL)

Arguments

df

The data frame to check

filename

A character string of the filename to check

Value

A list containing:

check

Character string with the stage that the check belongs to.

result

Character string, either "PASS", "FAIL" or "ADVISORY".

message

Character string with feedback about the check.

Details

Filename is optional and is used to populate the feedback message.

Examples

df <- eesyscreener::example_data
check_empty_cols(df, "datafile.csv")
#> $check
#> [1] "check_empty_cols"
#> 
#> $result
#> [1] "PASS"
#> 
#> $message
#> [1] "'datafile.csv' does not have any blank columns."
#> 
check_empty_cols(df)
#> $check
#> [1] "check_empty_cols"
#> 
#> $result
#> [1] "PASS"
#> 
#> $message
#> [1] "the tested data frame does not have any blank columns."
#>