Guess the source of names based on predefined mappings. The function counts
how many elements in the input vector x match the names defined in the
mapping schema for each software and returns the software with the highest
match count.
Usage
guessSource(x = character(), map = softwareMappingSchema())Arguments
- x
A
charactervector of names for which the source should be guessed.- map
Optional
data.framewith a custom mapping schema. If not provided, the default mapping schema defined in the package will be used. Thedata.framemust contain the software names as column names and the corresponding names as values.
See also
Other name translation functions:
nameMapping(),
softwareMapping(),
softwareMappingSchema(),
translate()
Examples
## MS-Dial names
x <- c("Average Rt(min)", "Alignment ID", "Average Mz")
guessSource(x)
#> [1] "MS-Dial"
