I have an error when I try to set the operations costs in
stringdist
Any ideas why ?
library(stringdist)
seq = rbind(
c('aaa'),
c('aba'),
c('aab'),
c('ccc')
)
This works perfectly (Levensthein distance)
stringdistmatrix(a = seq, b = seq, method = 'lv')
When I want to set the costs (substitution twice the indel)
stringdistmatrix(a = seq, b = seq, method = 'lv', weight = c(1,1,2,0))
I have this error
Error: all(weight > 0) is not TRUE