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

是否可以实现热图聚类 #15

Closed
shishishiny opened this issue Apr 5, 2023 · 2 comments
Closed

是否可以实现热图聚类 #15

shishishiny opened this issue Apr 5, 2023 · 2 comments

Comments

@shishishiny
Copy link

先感谢非常好用的包
出图的结果希望,热图部分能进行聚类再展示,可以实现吗

@Hy4m
Copy link
Owner

Hy4m commented Apr 18, 2023

linkET(在使用之前,请确保版本是0.0.7.3,要是之前的版本可能会报错)提供了一个相对简单的聚类函数reorder_by(),最简单的使用方法如下:

library(linkET)
set_corrplot_style()
correlate(mtcars) |>
  reorder_by() |> #同时对行列进行聚类
  qcorrplot() +
  geom_square()


rand_correlate(30, 10) |>
  reorder_by(by_rows = "hclust",
             by_cols = "none") |> #仅仅对行聚类
  qcorrplot() +
  geom_square()

@shishishiny
Copy link
Author

shishishiny commented Apr 18, 2023 via email

@Hy4m Hy4m closed this as completed Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants