Problems with the function "insert_left"
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 45/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- r
研究方向
Start by reproducing the supplied heatmap and dendrogram example with aplot 0.2.0, then compare the same call with 0.1.8 and 0.1.9. Trace the insert_left entry point and the limit handling that produces the zero_range error; done means the example combines successfully without the coercion warning or missing-value error.
由索引模型根據 Issue 內容生成。
描述
When using the aplot package (version 0.2.0), the following error message appears when using the function "insert_left":
Error in if (zero_range(as.numeric(limits))) { :
missing value where TRUE/FALSE needed
In addition: Warning message:
In zero_range(as.numeric(limits)) : NAs introduced by coercion
We have a matrix to plot heatmap like this:
And then we use the following code to generate the cluster tree:
dd <- dist(plotdata1, method = "euclidean")
hc <- hclust(dd, method = "ward.D2")
library(ggdendro)
pa=ggdendrogram(hc,theme_dendro = F)+
coord_flip()+
scale_y_reverse()+
theme_void()
Then the heatmap plot was plotted using the following code:
plotdata1 %>% ggplot(aes(x=condition,y=celltype))+
geom_tile(aes(fill = value),color = tile_color)+
scale_y_discrete(expand = c(0,0),position = "right")+
scale_x_discrete(expand = c(0,0))+
theme_bw()+
theme(
panel.grid = element_blank(),
axis.title = element_blank(),
axis.ticks.length = unit(0.15,"cm"),
axis.text.y.right = element_text(size = 12,colour = "black"),
axis.text.x.bottom = element_text(size = 12,colour = "black",angle = 0,hjust = 0.5)
)
And if I want to combine the two plot, Error was occured:
>insert_left(pb,pa,width = relative_width)
Error in if (zero_range(as.numeric(limits))) { :
missing value where TRUE/FALSE needed
In addition: Warning message:
In zero_range(as.numeric(limits)) : NAs introduced by coercion
However, aplot (version 0.1.8) works fine whereas vesion 0.1.9 and 0.2.0 can't. So maybe it's necessary to solve this problem in the next vesion.
- 主要語言
- R
- 星號
- 131
- 分支
- 17
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
YuLab-SMU/aplot 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 20/100
-
難度 5/5 一週以上 新手友好度 25/100
-
難度 5/5 一週以上 新手友好度 25/100
-
難度 4/5 3-5 天 新手友好度 25/100
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 62/100
-
難度 2/5 1-3 小時 新手友好度 72/100
stan-dev/priorsense#150 ·
-
難度 2/5 1-3 小時 新手友好度 62/100
xuzhougeng/wisp-science#1571 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 70/100
-
難度 2/5 1-3 小時 新手友好度 66/100
bennettoxford/opencodecounts#170 ·