resolve_href.Rd
This function takes:
A table code (e.g. "np3106rr"),
A list of parameters (one for each dimension),
The table_info_long
metadata (with dimension codes in the needed order),
(Optionally) a language code (default "en").
resolve_href(table_code, param_list, table_info_long, lang = "en")
Character: an 8-character code for the table, e.g. "np3106rr"
List: user-supplied dimension selections, in the order of the table's dimensions
A data frame of metadata (long format) for the given table
Character: the language code ("en" or "sk"), default "en"
Character string suitable for appending after the table code in the SUSR dataset endpoint.
It then:
Expands special keywords, such as "last5" or "districts",
Checks them against the actual available dimension values via susr_dimension_values()
,
Discards any invalid codes, warns the user,
If no valid codes remain, attempts to use "all" if available, otherwise the first available value for that dimension, and warns the user.
Finally, it returns a single string of the form: "VAL11,VAL12/.../VALN1,VALN2" for use in the dataset endpoint call.