remapOUs | R Documentation |
Function which converts mechanism codes, names, or shortnames to
another class of identifiers. remapOUs
should be supplied a vector of
organisation Units (names, codes or shortnames) along with the other required
paramaters. It will return a vector of to another class of identifiers.
remapOUs(
ous_in,
organisationUnit,
mode_in = "code",
mode_out = "id",
d2session = dynGet("d2_default_session", inherits = TRUE)
)
ous_in |
A vector of organisation unit identifiers (codes, names, or shortNames). |
organisationUnit |
Organisation unit ancestor. |
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 organisation unit UIDs will remap organisation units specified as codes to UIDs
## Not run:
d <- d2Parser("myfile.csv",type="csv")
d$ou_names <- remapOUs(d$organisationUnits,mode_in="id",mode_out="shortName")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.