View source: R/remapCategoryOptionCombos.R
remapCategoryOptionCombos | R Documentation |
Function which converts category option combos from identifier
to another. remapCategoryOptionCombos
should be supplied a vector of
category option combos (names, codes, uids, or shortnames). It will return a
vector of another class as specified with the mode_out
paramater.
remapCategoryOptionCombos(
cocs_in,
mode_in,
mode_out,
d2session = dynGet("d2_default_session", inherits = TRUE)
)
cocs_in |
A vector of category option combinations. |
mode_in |
Should be one of code, name,shortName or id. This is the class we are mapping from. |
mode_out |
Should be one of code,name,shortName or id. This is the class we are mapping to. |
d2session |
DHIS2 Session id |
Returns a vector of category option combos of the mode_out type.
## Not run:
d <- d2Parser("myfile.csv", type = "csv")
d$coc_codes <- remapOUs(d$categoryOptionCombos,
mode_in = "id",
mode_out = "code")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.