levenAll: Wrapper for .C Levenshtein function

View source: R/leven.R

levenAllR Documentation

Wrapper for .C Levenshtein function

Description

Align and calculate distance betweeen two strings based on Levenshtein distance with ends-free or homopolymer alignments possible (probably not called directly)

Usage

levenAll(
  string1,
  string2,
  homoLimit = 0,
  prepend = NULL,
  append = NULL,
  revComp = FALSE,
  align = FALSE,
  nThreads = 1
)

Arguments

string1

A single string or vector of strings

string2

Another single string or vector of strings

homoLimit

deletions or insertions in homopolymers > homoLimit cost 0

prepend

1 or 2 for ends-free on front of string 1 or 2

append

1 or 2 for ends-free on back of string 1 or 2

revComp

Should the reverse compliment of string1 also be tested and the best of identity or reverse compliment returned?

align

Should an alignment be calculated

nThreads

If threads >1, run nThreads threads in parallel

Value

Either a distance or if align==TRUE a list with distance and alignment

Author(s)

Scott Sherrill-Mix R@sherrillmix.com

References

http://en.wikipedia.org/wiki/Levenshtein_distance


sherrillmix/levenR documentation built on Oct. 25, 2023, 11:42 a.m.