R: unused argument "label" in hclust

I use the following code to build and hierarchical cluster:

dat <- read.table(textConnection(" pdb PA EHSS 1avd_model.pdb 3028.0 3920.0 1ave_model.pdb 3083.0 4019.0 1ij8_model.pdb 2958.0 3830.0 1ldo_model.pdb 2889.0 3754.0 1ldq_model.pdb 2758.0 3590.0 1lel_model.pdb 2815.0 3650.0 1vyo_model.pdb 2877.0 3740.0 2a5b_model.pdb 3145.0 4103.0 2a5c_model.pdb 3072.0 3994.0 2a8g_model.pdb 3056.0 3978.0 2avi_model.pdb 2856.0 3700.0 2c4i_model.pdb 2934.0 3795.0 2cam_model.pdb 3112.0 4053.0 2jgs.pdb 2913.0 3739.0 3fdc_model.pdb 2837.0 3666.0"), header=TRUE) d <- dist(dat$PA, method = "euclidean") fit <- hclust(d, method="ward", labels=dat$pdb) plot(fit) 

But when it creates a cluster, I get the following error message unused argument(s) (labels = dat$pdb) .

Why work tags do not work?

+4
source share
2 answers

hclust does not accept labels ... but the method of constructing it. Try this to see:

 fit <- hclust(d, method="ward") plot(fit, labels=dat$pdb) 
+10
source

Probably because hclust has no argument labels ...

 > args(hclust) function (d, method = "complete", members = NULL) NULL <environment: R_GlobalEnv> 
+1
source

Source: https://habr.com/ru/post/1386162/


All Articles