Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rect_to_poly issue #601

Open
GuangchuangYu opened this issue Feb 5, 2024 · 9 comments
Open

rect_to_poly issue #601

GuangchuangYu opened this issue Feb 5, 2024 · 9 comments
Assignees
Labels

Comments

@GuangchuangYu
Copy link
Member

rect_to_polygeom_hilight中有使用,https://github.com/YuLab-SMU/ggtree/blob/devel/R/geom_hilight.R#L200,然而这个函数有问题,而且已经被ggplot2移除了,tidyverse/ggplot2#5081.

所以我们也需要对接一下,参考ggplot2中新的实现,因为老的实现如果直接搬过来的话,那问题依然存在,在使用极坐标时,形状有点问题。

@GuangchuangYu
Copy link
Member Author

先copy这段代码,让ggtree兼容新版ggplot2. 后面再相应更新。

@James-Kitson
Copy link

I'm currently having issues installing ggtree with the error:

Error in get(x, envir = ns, inherits = FALSE) : object 'rect_to_poly' not found

Is my issue also linked to the changes to ggplot2?

I'm on R version 4.3.0 and ggplot2 3.5.0

Thanks!

@AlexLOTR
Copy link

AlexLOTR commented Apr 3, 2024

I'm currently having issues installing ggtree with the error:

Error in get(x, envir = ns, inherits = FALSE) : object 'rect_to_poly' not found

Is my issue also linked to the changes to ggplot2?

I'm on R version 4.3.0 and ggplot2 3.5.0

Running into the same error when installing ggtree package:
Error in get(x, envir = ns, inherits = FALSE) :
object 'rect_to_poly' not found
Error: unable to load R code in package ‘ggtree’
Execution halted
ERROR: lazy loading failed for package ‘ggtree’

  • removing ‘/usr/local/lib/R/site-library/ggtree’

quote: 先copy这段代码,让ggtree兼容新版ggplot2. 后面再相应更新。
where should i copy these codes into?

@AlexLOTR
Copy link

I'm currently having issues installing ggtree with the error:
Error in get(x, envir = ns, inherits = FALSE) : object 'rect_to_poly' not found
Is my issue also linked to the changes to ggplot2?
I'm on R version 4.3.0 and ggplot2 3.5.0

Running into the same error when installing ggtree package: Error in get(x, envir = ns, inherits = FALSE) : object 'rect_to_poly' not found Error: unable to load R code in package ‘ggtree’ Execution halted ERROR: lazy loading failed for package ‘ggtree’

* removing ‘/usr/local/lib/R/site-library/ggtree’

quote: 先copy这段代码,让ggtree兼容新版ggplot2. 后面再相应更新。 where should i copy these codes into?

I found a solution guys!
After upgrading the BiocManager to ver 3.18, I can install the ggtree and enrichplot packages normally:

BiocManager::install(version = "3.18")
library("BiocManager")
Bioconductor version 3.18 (BiocManager 1.30.22), R 4.3.1 (2023-06-16)
BiocManager::install("ggtree")
library("ggtree")
ggtree v3.10.1 For help: https://yulab-smu.top/treedata-book/

@James-Kitson
Copy link

This seems to work for me! Thanks

@AmelZulji
Copy link

I have the same problem:

Error in get(x, envir = ns, inherits = FALSE) : 
  object 'rect_to_poly' not found
Error: unable to load R code in package ‘ggtree’
Execution halted
ERROR: lazy loading failed for package ‘ggtree’

I am on RHEL HPC and have bioconductor version 3.16 which i cant upgrade.

Can you please help

Regards,
Amel

@GuangchuangYu
Copy link
Member Author

@AmelZulji Upgrade ggtree or downgrade ggplot2.

@AmelZulji
Copy link

Thank you for the quick replay, Yu! The version of ggtree which is failing is the newest one 3.6.2.

I will try donwgrading ggplot2. Do you know which version of ggplot2 would be compatible perhaps <3.5.0 ?

@GuangchuangYu
Copy link
Member Author

Thank you for the quick replay, Yu! The version of ggtree which is failing is the newest one 3.6.2.

I will try donwgrading ggplot2. Do you know which version of ggplot2 would be compatible perhaps <3.5.0 ?

yes, ggplot2 v<3.5.0 should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants