check_format: check_format

View source: R/scrape_AE_data_Eng.R

check_formatR Documentation

check_format

Description

check_format

Usage

check_format(raw_data, verbose = FALSE)

Arguments

raw_data

a data frame containing A&E provider data for one month, from the NHS England website

verbose

control level of detail returned

Value

boolean indicating whether data frame is in correct format for analysis. Length 1 if verbose = FALSE, length 6 if not - in this case each element pertains to a specific aspect of raw_data that is checked, respectively: 1 - column 1 contains the heading Code 2 - column 2 contains the heading Region 3 - column 3 contains the heading Name 4 - column 4 contains the heading A&E attendances 5 - column 8 contains the heading A&E attendances > 4 hours from arrival to admission 6 - column 14 contains the heading Emergency Admissions Note that the 5th element allows the words greater than as well as the symbol.

Examples

## Not run: 
  dataList <- load_AE_files(directory = 'nhsAEscraper/sitreps/')
  check_format(dataList[[1]], verbose = TRUE)

## End(Not run)

HorridTom/nhsAEscraper documentation built on Jan. 28, 2024, 9:15 a.m.