Downloads a single resource from the NHS Open Data platform by resource ID, with optional filtering and column selection.
get_resource(
res_id,
rows = NULL,
row_filters = NULL,
col_select = NULL,
include_context = FALSE
)
The resource ID as found on NHS Open Data platform (character).
(optional) Maximum number of rows to return (integer).
(optional) A named list or vector specifying values of columns/fields to keep (e.g., list(Date = 20220216, Sex = "Female")).
(optional) A character vector containing the names of desired columns/fields (e.g., c("Date", "Sex")).
(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.
A tibble with the data.
get_dataset()
for downloading all resources from a given dataset.