首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >切线上的标签不起作用(dendextend)

切线上的标签不起作用(dendextend)
EN

Stack Overflow用户
提问于 2018-02-02 21:58:58
回答 1查看 357关注 0票数 0

我尝试了几次将标签放在tanglegram (package dendextend)上,但我的标签(etic)不起作用,它们也在一个简单的图上起作用。我应该使用哪个命令?

代码语言:javascript
复制
> 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
EN

回答 1

Stack Overflow用户

发布于 2018-02-03 21:46:50

函数中没有名为"labels“的参数。你应该更新树状图的标签,并将其提供给纠缠图。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48584242

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档