Hi, dear list.
I found that hclust causes segfault in R 3.0.1, here is the code after
starting R --vanilla:
test.data <- function(dim, num, seed=17) {
set.seed(seed)
matrix(rnorm(dim * num), nrow=num)
}
m <- test.data(120, 45)
library(rpud) # load rpud with rpudplus
d <- rpuDist(m) # Euclidean distance
system.time(hclust(d))
And I have the following error message:
*** glibc detected *** /usr/lib/R/bin/exec/R: malloc(): memory corruption:
0x0000000002d64b80 ***
On the other hand, if I use dist() instead of rpuDist(), everything will be
fine, I notice there is some difference between the results returned by
these two functions:
R>str(d)
Class 'dist' atomic [1:990] 13.8 12.9 15 15.5 17.1 ...
..- attr(*, "Size")= int 45
..- attr(*, "Diag")= logi FALSE
..- attr(*, "Upper")= logi FALSE
..- attr(*, "method")= chr "euclidean"
..- attr(*, "call")= language dist(x = m)
R>str(d1)
Class 'dist' atomic [1:990] 13.8 12.9 15 15.5 17.1 ...
..- attr(*, "Csingle")= logi TRUE
..- attr(*, "Size")= int 45
..- attr(*, "Diag")= logi FALSE
..- attr(*, "Upper")= logi FALSE
..- attr(*, "method")= chr "euclidean"
..- attr(*, "call")= language rpuDist(points = m)
Best regards,
Kaiyin ZHONG
------------------------------
FMB, Erasmus MC
k.zhong@erasmusmc.nl
kindlychung@gmail.com
[[alternative HTML version deleted]]