Get Open Data resource
Usage
get_resource(
res_id,
rows = NULL,
row_filters = NULL,
col_select = NULL,
include_context = FALSE
)
Arguments
- res_id
The resource ID as found on NHS Open Data platform
- rows
(optional) specify the max number of rows to return.
- row_filters
(optional) a named list or vector that specifies values of columns/fields to keep. e.g. list(Date = 20220216, Sex = "Female").
- col_select
(optional) a character vector containing the names of desired columns/fields. e.g. c("Date", "Sex").
- include_context
(optional) If
TRUE
additional information about the resource will be added as columns to the data, including the resource ID, the resource name, the creation date and the last modified/updated date.
Value
a tibble with the data
See also
get_dataset()
for downloading all resources
from a given dataset.