簡體   English   中英

解開錯誤標簽在兩棵樹中都不匹配

[英]untangle error labels do not match in both trees

我有兩個樹狀圖,我試圖計算如下的糾纏:

    dend12 <- dendlist(dend1, dend2)
    x <- dend12 %>% untangle(method = "step2side")

這些樹狀圖是有效的二叉樹。

我收到錯誤消息:

Error in match_order_by_labels(dend2, dend1) : labels do not match in both trees. Please make sure to fix the labels names! (make sure also that the labels of BOTH trees are 'character')

我檢查了兩棵樹的標簽是否都是“字符”類型,但我不明白的是,當我這樣做時:

sort(labels(dend1)) == sort(labels(dend2))

我得到了所有 Trues 的向量,表明標簽是相同的,所以我不明白我的錯誤來自哪里。

有人可以從阻止我執行解開功能的錯誤中解釋“兩棵樹中的標簽不匹配”的確切含義嗎?

兩棵樹之一中的標簽有可能是數字嗎? 嘗試在樹列表中的兩棵樹上運行 labels_to_character,看看是否有效。 如果是這樣 - 請告訴我們。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

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