Hello- I am trying to get bootstrapped values (both AU and BP) associated with a cluster analysis, but running into an error message that I can't decipher or seem to correct. I have used the approach shown below before without any trouble, so I am perplexed about where the error is.
Please review code below and see if you can determine where the error is. I know, I know, not the most elegant approach, but needs to be done anyhow. You'll note that the program seems to work fine for creating and plotting the clusters, but the foul-up seems to happen at the step of adding in the bootstrap values. Also, the data that are input as the matrix is already a distance matrix. Thanks very much! > headspace = matrix( + + c( + + 0.00,5.34,5.88,2.89,4.39,3.38,3.50,3.55,3.76,3.84,2.62,2.37,4.73,4.73,4.73,4.73,4.73,4.73,4.73,4.73,4.73,4.73,4.73, + 5.34,0.00,7.57,4.33,5.17,5.68,5.07,6.08,4.96,6.20,5.10,5.31,5.95,5.95,5.95,5.95,5.95,5.95,5.95,5.95,5.95,5.95,5.95, + 5.88,7.57,0.00,6.30,7.57,7.50,7.38,7.80,6.87,6.75,5.86,6.38,7.68,7.68,7.68,7.68,7.68,7.68,7.68,7.68,7.68,7.68,7.68, + 2.89,4.33,6.30,0.00,4.33,2.97,2.57,4.00,2.05,3.21,2.11,2.74,4.08,4.08,4.08,4.08,4.08,4.08,4.08,4.08,4.08,4.08,4.08, + 4.39,5.17,7.57,4.33,0.00,4.91,4.72,4.33,5.53,6.93,5.82,5.80,7.29,7.29,7.29,7.29,7.29,7.29,7.29,7.29,7.29,7.29,7.29, + 3.38,5.68,7.50,2.97,4.91,0.00,0.79,1.90,2.16,4.48,3.87,2.51,3.45,3.45,3.45,3.45,3.45,3.45,3.45,3.45,3.45,3.45,3.45, + 3.50,5.07,7.38,2.57,4.72,0.79,0.00,2.20,1.74,4.37,3.72,2.61,3.43,3.43,3.43,3.43,3.43,3.43,3.43,3.43,3.43,3.43,3.43, + 3.55,6.08,7.80,4.00,4.33,1.90,2.20,0.00,3.70,5.46,4.98,3.65,4.87,4.87,4.87,4.87,4.87,4.87,4.87,4.87,4.87,4.87,4.87, + 3.76,4.96,6.87,2.05,5.53,2.16,1.74,3.70,0.00,3.71,2.92,2.38,2.60,2.60,2.60,2.60,2.60,2.60,2.60,2.60,2.60,2.60,2.60, + 3.84,6.20,6.75,3.21,6.93,4.48,4.37,5.46,3.71,0.00,2.07,2.97,4.51,4.51,4.51,4.51,4.51,4.51,4.51,4.51,4.51,4.51,4.51, + 2.62,5.10,5.86,2.11,5.82,3.87,3.72,4.98,2.92,2.07,0.00,2.04,3.89,3.89,3.89,3.89,3.89,3.89,3.89,3.89,3.89,3.89,3.89, + 2.37,5.31,6.38,2.74,5.80,2.51,2.61,3.65,2.38,2.97,2.04,0.00,2.77,2.77,2.77,2.77,2.77,2.77,2.77,2.77,2.77,2.77,2.77, + 4.73,5.95,7.68,4.08,7.29,3.45,3.43,4.87,2.60,4.51,3.89,2.77,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00, + 4.73,5.95,7.68,4.08,7.29,3.45,3.43,4.87,2.60,4.51,3.89,2.77,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00, + 4.73,5.95,7.68,4.08,7.29,3.45,3.43,4.87,2.60,4.51,3.89,2.77,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00, + 4.73,5.95,7.68,4.08,7.29,3.45,3.43,4.87,2.60,4.51,3.89,2.77,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00, + 4.73,5.95,7.68,4.08,7.29,3.45,3.43,4.87,2.60,4.51,3.89,2.77,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00, + 4.73,5.95,7.68,4.08,7.29,3.45,3.43,4.87,2.60,4.51,3.89,2.77,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00, + 4.73,5.95,7.68,4.08,7.29,3.45,3.43,4.87,2.60,4.51,3.89,2.77,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00, + 4.73,5.95,7.68,4.08,7.29,3.45,3.43,4.87,2.60,4.51,3.89,2.77,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00, + 4.73,5.95,7.68,4.08,7.29,3.45,3.43,4.87,2.60,4.51,3.89,2.77,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00, + 4.73,5.95,7.68,4.08,7.29,3.45,3.43,4.87,2.60,4.51,3.89,2.77,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00, + 4.73,5.95,7.68,4.08,7.29,3.45,3.43,4.87,2.60,4.51,3.89,2.77,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00 + + ), + + nrow = 23, + ncol = 23, + byrow = TRUE) > > library (pvclust) > > headspace <- as.dist(headspace) > > fit1 <- hclust(headspace, method="ward") > plot(fit1) > > fit2 <- pvclust(headspace, method.hclust ="ward", method.dist="euclidean") Error in names(edges.cnt) <- paste("r", 1:rl, sep = "") : 'names' attribute [2] must be the same length as the vector [0] [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.