簡體   English   中英

Tanglegram上的標簽不起作用(dendextend)

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM