Closed codetrainee closed 5 years ago
Thanks for the fantastic packages. It really saved me a lot of time in my project. But I found a subtle difference in the parDist() output compared to dist() in base packages. The Labels attribute is gone. Here is the reproducible example.
m <- matrix(1:12, 4) colnames(m) <- c("A", "B", "C") rownames(m) <- c("a", "b", "c", "d") str(dist(m)) #> 'dist' num [1:6] 1.73 3.46 5.2 1.73 3.46 ... #> - attr(*, "Size")= int 4 #> - attr(*, "Labels")= chr [1:4] "a" "b" "c" "d" #> - attr(*, "Diag")= logi FALSE #> - attr(*, "Upper")= logi FALSE #> - attr(*, "method")= chr "euclidean" #> - attr(*, "call")= language dist(x = m) str(parallelDist::parDist(m)) #> 'dist' num [1:6] 1.73 3.46 5.2 1.73 3.46 ... #> - attr(*, "Size")= int 4 #> - attr(*, "Diag")= logi FALSE #> - attr(*, "Upper")= logi FALSE #> - attr(*, "method")= chr "euclidean" #> - attr(*, "call")= language parallelDist::parDist(x = m)
Created on 2018-11-13 by the reprex package (v0.2.0).
Thanks, should be fixed with https://github.com/alexeckert/parallelDist/commit/3835e67fd730422ea957bc1216f0838395796fd6
Excellent. Thanks for your effort.
Thanks for the fantastic packages. It really saved me a lot of time in my project. But I found a subtle difference in the parDist() output compared to dist() in base packages. The Labels attribute is gone. Here is the reproducible example.
Created on 2018-11-13 by the reprex package (v0.2.0).