| remapMechs | R Documentation | 
Function which converts mechanism codes, names or shortnames to
UIDs. remapMechs should be supplied a vector of data mechanisms
(names, codes or shortnames) along with the other required paramaters.
It will return a vector of UIDs.
remapMechs(
  mechs_in,
  organisationUnit,
  mode_in = "code",
  mode_out = "id",
  d2session = dynGet("d2_default_session", inherits = TRUE)
)
| mechs_in | A vector of data element 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 mechanism UIDs
## Not run: 
d <- d2Parser("myfile.csv",type="csv")
#Add a new column with organisation unit short names.
d$mech_names <- remapMechs(d$attributeOptionCombo,
                           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.