Map names from one software to another. The function replaces elements
in the input vector x with their corresponding values in the mapping if a
match is found. If an element in x does not have a corresponding mapping,
it is returned unchanged with a warning.
Usage
translate(x = character(), mapping = NULL)See also
Other name translation functions:
guessSource(),
nameMapping(),
softwareMapping(),
softwareMappingSchema()
Examples
## MS-Dial names
x <- c("Average Rt(min)", "Alignment ID", "Average Mz")
map_vec <- nameMapping(from = "MS-Dial", to = "mzTab-M")
translate(x, mapping = map_vec)
#> Average Rt(min) Alignment ID
#> "retention_time_in_seconds" "SMF_ID"
#> Average Mz
#> "exp_mass_to_charge"
