append_team_data_from_teamcode: append_team_data_from_teamcode

Description Usage Arguments Details Value Author(s)

View source: R/teamcodetoname.R

Description

teamcodetoname is a macro (rather than a function) which converts team codes in the raw SSNAP data to team names.

Usage

1

Arguments

data_table

A tibble (optimised data frame) containing S1PostcodeOut.

Details

This macro takes as input a tibble (an optimised data frame; see the tibble package).

The function API needs nailing down more firmly - at present it knows of three hard-coded column names (TeamName, TransferFrom and TransferTo) but it should be able to work more generically in future if we provide it with a column name to translate and an output name.

It also requires Unit tests which currently we don't have. Take this function as a 'work in progress' It will not win an R beauty contest any time soon.

Value

Data table updated with Team names in TeamName, TransferToTeamName, TransferFromTeamName, and S7TransferHospitalName

Author(s)

Andrew Hill, andrew.hill@doctors.org.uk


md0u80c9/SSNAPStats documentation built on Feb. 11, 2020, 11:43 a.m.