cor_plot: Get correlation between columns

cor_plotR Documentation

Get correlation between columns

Description

Get correlation between columns

Usage

cor_plot(
  dt_cor,
  col = c(low = "blue", high = "red", mid = "white", na.value = "white"),
  limit = c(ifelse(min(dt_cor$Cor, na.rm = TRUE) < 0, -1, 0), 1),
  midpoint = mean(limit),
  label_name = "Pearson\nCorrelation",
  text_size = 4,
  legend.position = c(0.4, 0.7),
  legend.direction = "horizontal"
)

Arguments

dt_cor

a data.table, with column Cor

col

colors c(low = "blue", high = "red", mid = "white", na.value = "white")

limit

default (-1, 1), defined by: c(ifelse(min(dt_cor$Cor, na.rm = TRUE) < 0, -1, 0), 1)

midpoint

midpoint of correlation values in label coloring.

label_name

name of correlation method, default "Pearson Correlation" with newline after Pearson.

text_size

size of correlation numbers

legend.position

default c(0.4, 0.7), other: "top", "right",..

legend.direction

default "horizontal", or "vertical"

Value

a ggplot (heatmap)


Roleren/ORFik documentation built on April 25, 2024, 8:41 p.m.