pir_org_type: Create ordered factor variable for PIR organisation type.

View source: R/pir_org_type.R

pir_org_typeR Documentation

Create ordered factor variable for PIR organisation type.

Description

As imported, PIR organisation types are character variables. For the correct ordering when reshaping wide, this needs to be a factor variable.

Usage

pir_org_type(x)

Arguments

x

The column of a data frame giving the PIR organisation type.

Examples

x <- data.frame(pir = c("", "NHS Trust", "Clinical Commissioning Group",
"Total Reported Cases", NA))

x$pir2 <- pir_org_type(x$pir)

PublicHealthEngland/hcaidcs documentation built on Jan. 19, 2024, 8:38 a.m.