I am trying to calculate the distances between pairs using distances function in r language and I have selected HVDM as the matric. My code looks like this:
library("UBL")
df <- read.table(file="C:/Users/Mahin/Workspace/Abalone/abalone.txt",header=T, sep=",")
dist1 <- distances("rings", df, "HVDM")
print(dist1)
I have also tried putting 9 in place of the target column as the rings column is at 9th position. Something like this:
dist1 <- distances(9, df, "HVDM")
Nonetheless, nothing works. Could anyone please point out the mistake that I have made?