R6 class storing health statistics for a list of health units.
Source:R/health_unitgp.R
health_unitgrp.RdR6 class storing health statistics for a list of health units.
R6 class storing health statistics for a list of health units.
Methods
Method health_unit()
Get stored health unit.
Method subset()
Subset health unit group.
Method summary()
Summarise grp unit data.
Arguments
type(character(1))
Character specifying summary type. Seesummary_typesfor options....Passed to method.
Examples
x <- example_gp_grp_unit()
x[["summary"]](type = "lookup")
x <- example_hospital_grp_unit()
x[["summary"]](type = "lookup")Method summary_info()
Get summary info for grp unit.
Arguments
type(character(1))
Character specifying summary type. Seesummary_typesfor options....Passed to summary info functions.
Examples
x <- example_gp_grp_unit()
x[["summary_info"]](type = "lookup")
x <- example_hospital_grp_unit()
x[["summary_info"]](type = "lookup")Method datatable()
Create datatable of grp unit data
Arguments
type(character(1))
Character specifying summary type. Seesummary_typesfor options.nsShiny Namespace. Default is NULL.
...Passed to method.
Examples
x <- example_gp_grp_unit()
x[["datatable"]](type = "lookup")
x <- example_hospital_grp_unit()
x[["datatable"]](type = "lookup")Examples
## ------------------------------------------------
## Method `health_unitgrp$summary`
## ------------------------------------------------
x <- example_gp_grp_unit()
x[["summary"]](type = "lookup")
#> Title ID
#> 1 Muirhead Medical Centre 10002
#> 2 The Blue Practice 10017
#> Address
#> 1 Muirhead Medical Centre, Liff Road, Muirhead, DD2 5NH
#> 2 The Blue Practice, Crieff Medical Centre, King Street, Crieff, PH7 3SA
#> Telephone Health board
#> 1 01382 580 264 S08000030
#> 2 01764 652 283 S08000030
x <- example_hospital_grp_unit()
x[["summary"]](type = "lookup")
#> Title ID Address
#> 1 Arran War Memorial Hospital A101H Lamlash, Isle of Arran, KA278LF
#> 2 Ailsa Hospital A201H Dalmellington Road, Ayr, KA6 6AB
#> Health board
#> 1 S08000015
#> 2 S08000015
## ------------------------------------------------
## Method `health_unitgrp$summary_info`
## ------------------------------------------------
x <- example_gp_grp_unit()
x[["summary_info"]](type = "lookup")
#> [1] "This lookup table presents data for all available GP practices\n in the data set. This table can be searched, filtered and\n the 'Plot' column allows the user to view statistics for a\n selected GP practice."
x <- example_hospital_grp_unit()
x[["summary_info"]](type = "lookup")
#> [1] "This lookup table presents data for all available hospitals\n in the data set. This table can be searched, filtered and\n the 'Plot' column allows the user to view statistics for a\n selected hospital."
## ------------------------------------------------
## Method `health_unitgrp$datatable`
## ------------------------------------------------
x <- example_gp_grp_unit()
x[["datatable"]](type = "lookup")
x <- example_hospital_grp_unit()
x[["datatable"]](type = "lookup")