[英]Labels on Tanglegram not working (dendextend)
我尝试过几次将标签放在缠结图中(包dendextend),但是我的标签(etic)不起作用,它们也可以在简单图上使用。 我应该使用哪个命令?
> dati<-read.table("moto.txt",header=T)
> dat<-dati[,-1:-3] #I delete the first three columns because they are
qualitative variables (motorcycle brand and model)
> etic<-read.table("moto.txt",header=T)[,2] #my labels (motorcycle model)
> etic
[1] R1200GS AfricaT V-Strom Scrambl MT-07 Z650 Tracer Multist CB500X
Iron883 CMX500 Vulcan Supers CBR-RR GSX-R
> sdx<-scale(dat)
> d<-dist(sdx)#I assign the matrix of distances to "d"
> library (dendextend)
> hc1<-hclust(d,method="complete")
> hs1<-hclust(d,method="single")
> tanglegram(hc1,hs1, labels=etic)
Error in axis(side = side, at = at, labels = labels, ...) :
'labels' is supplied and not 'at'
Inoltre: Warning messages:
1: In plot.window(...) : parametro grafico "labels" non valido
2: In plot.xy(xy, type, ...) : parametro grafico "labels" non valido
> tanglegram(hc1,hs1) #tanglegram work but without labels
函数中没有称为“标签”的参数。 您应该更新树状图的标签,并将其提供给缠结图。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.