paobranco/UBL

SMOGN distances not accumulating

Closed this issue · 1 comments

Perhaps I'm missing something but it appears the distances of the numeric variables are not accumulating and only the distance of the last column is stored in d1 and d2 before moving on:

d1 <- abs(T[i, x] - newM[(i - 1) * nexs + n, x])/ranges[x]

Shouldn't that be d1 <- d1 + abs(T[i, x] - newM[(i - 1) * nexs + n, x])/ranges[x]? Likewise for d2?

Duplicate of #9