Skip to contents

Checks that region_code and region_name columns are present in the data file and contain no missing values for rows at the Local authority district geographic level. Regional information should ideally be provided for all Local authority district level data.

Usage

check_geog_region_for_lad(data, verbose = FALSE, stop_on_error = FALSE)

Arguments

data

A data frame of the data file

verbose

logical, if TRUE prints feedback messages to console for every test, if FALSE run silently

stop_on_error

logical, if TRUE will stop with an error if the result is "FAIL", and will throw genuine warning if result is "WARNING"

Value

a single row data frame

Details

If no Local authority district level data is present in the file, the check passes immediately.

Examples

check_geog_region_for_lad(example_data)
#>                 check result
#> 1 geog_region_for_lad   PASS
#>                                                             message
#> 1 There is no Local authority district level data in the data file.
#>   guidance_url
#> 1           NA