Hy4m / linkET

Everything is Linkable
135 stars 38 forks source link

Intergrate correlation #5

Closed Microbion closed 2 years ago

Microbion commented 2 years ago

I found a R package named correlation with many different kinds of correlations. So would you like to intergrate it into linkET?

Hy4m commented 2 years ago

You can do this in two ways:

First way

correlate() function in linkET has a engine parameter which can be used to customize the calculation function.

library(linkET)
correlate(mtcars, engine = "correlation") %>%
  qcorrplot() + geom_square()

Second way

You can compute correlation matrix by correlation package, and then uses as_md_tbl() function in linkET converting to a md_tbl.

library(correlation)
correlation(mtcars) %>%
  as_md_tbl() %>%
  qcorrplot() + geom_square()