get_hospital_attribute {hospitals} | R Documentation |
Get hospital attribute
Description
get_hospital_attribute
retrieves one of the variables of hospitals
as indicated in x
. Hospitals in x
can be specified by the: (i) hospital
identifier, (ii) acronym, or the (iii) shortened or (iv) full version of the
hospital name.
Usage
get_hospital_attribute(x, key = "hospital_id", value = "hospital_short_name")
Arguments
x |
A character vector of values that refer to hospitals, can be either
the hospital identifier (e.g. |
key |
A string indicating the type of values in |
value |
A string indicating the hospital attribute to be returned, can
be any of the columns of |
Value
A character vector of hospital attributes.
Examples
# Get the short name of a hospital
# (same as get_hospital_attribute('h0001', value = 'hospital_short_name'))
get_hospital_attribute('h0001')
# Or get instead the full name
get_hospital_attribute('h0001', value = 'hospital_full_name')
# Map the hospital short name to its full name
get_hospital_attribute('IPO de Lisboa', key = 'hospital_short_name', value = 'hospital_full_name')