Questions tagged [dendextend]

Questions on the R package dendextend

The dendextend R package includes functions and methods for extending dendrogram objects in R (visualization, manipulation and comparison).

158 questions
0
votes
1 answer

untangle error labels do not match in both trees

I have two dendrograms that I'm trying to calculate the entanglement of as follows: dend12 <- dendlist(dend1, dend2) x <- dend12 %>% untangle(method = "step2side") These dendrograms are valid binary trees. I'm getting the error…
wiscoYogi
  • 305
  • 2
  • 10
0
votes
1 answer

How to zoom a circular dendrogram in R?

I have this circular dendrogram in R and I want to zoom it. How can I proceed? Here it is: The following code was used: library(dendextend) library(circlize) load(file = "hc1.rda") #out1 <- cutree(hc1, k = 50) load(file = "out1.rda") dend <-…
Marilou
  • 31
  • 8
0
votes
1 answer

Dragging a column to the leftmost

I am a newbie on R and my question may be too simple. I am trying to draw a hierarchical cluster. I use readxl to read the data from a xlsx file. The dendextend package also includes the year column to calculations. I want to drag the year column to…
terzy
  • 13
  • 4
0
votes
0 answers

How to make dendrograms with legends on left side with dendextend package?

Good Afternoon I have SNP genotypying dataset with 469 individuals in 1st column and their population information in 2nd column and rest of the columns is marker data. Now i want to make dendrogram with legends on leftside of dendrogram using…
user2134713
  • 95
  • 1
  • 6
0
votes
2 answers

How to calculate the cophenetic similarity between two individual in two dendograms or between two clustering methods?

How can I calculate the cophenetic distance for an individual within two trees (not between two whole trees)? I want to calculate the similarity/dissimilarity in position per individual within two dendrograms and show the result in the row color of…
0
votes
1 answer

R: Can I 'set' my dendrogram with a for loop using dendextend?

Given the iris data set as an example, I do Pearson clusters using dendextend in the following way: library(RColorBrewer) library(dendextend) data(iris) newmat <- iris[,1:4] rownames(newmat) <- paste(iris$Species, rownames(iris)) dmat <- 1 -…
DaniCee
  • 2,397
  • 6
  • 36
  • 59
0
votes
1 answer

Baker's Gamma Distribution under H0 and FM index (dendextend)

I have some questions regarding the Baker's Gamma and FM indices in the dendextend package. What is the interpretation of the Baker's Gamma distribution under H0? i.e. when do you reject the null hypothesis? What is the difference between…
Ali
  • 1,048
  • 8
  • 19
0
votes
1 answer

Adding table rows to labels of dendrogram

I'm essentially trying to change the labels of my dendrogram, to the corresponding row in the table. For instance, consider the USArrest data set. Right now the labels on the dendrogram are just the states name, "Alabama" and so on. But looking at…
Steven Cunden
  • 395
  • 1
  • 3
  • 9
0
votes
1 answer

Preserving label and legend color across 2 dendograms

Objective: I would like to preserve label color and legend color across 2 dendograms created for the same dataset. I have the same dataset (40 observations) that is converted into a dendogram in 2 processes (pre-filtered and filtered). However, the…
user10101904
  • 427
  • 2
  • 12
0
votes
0 answers

Comparison of dendograms with dendextend::tanglegram - incorrect color asignment?

I'm using dendextend::tanglegram() to compare topologies of two trees. I observed occasional incorrect color-assignment of black colors to the branches which are in fact congruent (and thus should be colored). Is this a bug or am I doing something…
al-ash
  • 197
  • 2
  • 10
0
votes
1 answer

Dendextend Bk plot

My apologies if this question is trivial but I am having a problem to interpret the Bk plot from dendextend. There are 3 lines there: dented one to show FM index for every k, then red solid one and dashed black one. What are those last two lines? I…
AussieAndy
  • 101
  • 2
  • 11
0
votes
2 answers

Labels on Tanglegram not working (dendextend)

I tried several times to put the labels on the tanglegram (package dendextend) but my labels (etic) not working, they also work on a simple plot. Which command should I use? > dati<-read.table("moto.txt",header=T) > dat<-dati[,-1:-3] #I delete the…
muik45
  • 1
  • 2
0
votes
2 answers

Function to color branches in dendrogram plot using base R

I would like to write R function for coloring branches in dendrogram based on the given dendrogram object, specified number of clusters and vector of colors. I want to use base R instead of dendextend. Using the exact code from this answer:…
ira
  • 2,542
  • 2
  • 22
  • 36
0
votes
1 answer

Reorder and colour dendogram based on labels

I am trying to control the order and colour of a dendrogram. Obviously the point of the dendorgram is to order by similarity, but within branches I'd like to set an order that make sense (alphabetical-numeric). library(vegan) library(stats) x…
Birdonawire
  • 199
  • 3
  • 10
0
votes
1 answer

Labeling Row Names as Leaf Nodes Dendrogram Names in R

I am trying to Label my dendrogram using the designated Rownames from my dataset. I am using the package: hybridHclust with the following code. Sample Table (DATASET, I hope I am using the right format) UID Condition1 Condition2 Condition3 1 Gene1…
JWilli3
  • 1
  • 2
1 2 3
10
11