hclust error related to NA/NaN/Inf in foreign function call

HI - I'm getting an error while running the HCLUST code below ... ALso - My distance matrix is big ... (Attached for reference)

Calculations ;

csim <- csim %*% t(csim)
cdist <- as.dist(1 - csim)
hc <- hclust(cdist, "ward.D")

Error : Error in hclust(cdist, "ward.D") : NA/NaN/Inf in foreign function call (arg 11)

Please suggest.

Thanks,
Noel

Hi, and welcome.

A reproducible example, called a reprex will elicit more precise answers. It doesn't have to be your actual data, just in same form. Otherwise, without knowing what csim contains, it's guesswork turtles all the way down and a pure google problem with the odd possibly helpful link? on offer.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.