powered by
return resulted strings of approximate string match
get_analogue(fuzzy_input = "axs.txt", possibilities = c("axis.text", "axis.text.x"), n_top = 5, case_sensitive = FALSE, cost = c(insertions = 0.25, deletions = 3, substitutions = 2), threshold = 6)
A character. Typically user input.
A character vector one of which is assumed to be pointed by fuzzy_input.
An integer specifying the number of returned strings.
Default is FALSE.
A named vector
If costs are more than threshold, remove them from the result even if they are within top n_top. Default is 6.
n_top
get_analogue is a key function for returning useful compile error message.
get_analogue
# NOT RUN { # } # NOT RUN { get_analogue("axis.txt", c("axis.text", "axis.text.x", "axis.ticks")) # } # NOT RUN { # returns "axis.text" "axis.text.x" "axis.ticks" # }
Run the code above in your browser using DataLab