distanceSequenceLevenshtein: Levenshtein Distance forsSequences of numbers

View source: R/sequenceDistances.R

distanceSequenceLevenshteinR Documentation

Levenshtein Distance forsSequences of numbers

Description

Levenshtein distance for two sequences of numbers

Usage

distanceSequenceLevenshtein(x, y)

Arguments

x

first vector (numeric vector)

y

second vector (numeric vector)

Value

numeric distance value

d(x,y)

Examples

#e.g., used for distance between integer sequence
x <- c(0,1,10,2,4)
y <- c(10,1,0,4,-4)
distanceSequenceLevenshtein(x,y)
p <- replicate(10,sample(1:5,3,replace=TRUE),simplify=FALSE)
distanceMatrix(p,distanceSequenceLevenshtein)


CEGO documentation built on May 29, 2024, 3:35 a.m.