Skip to contents

Calculate Correlation, Return Correlation Results.

Usage

cor_and_plot(
  data.1,
  data.2 = NULL,
  method = "pearson",
  cor = 0.05,
  pvalue = 0.05
)

Arguments

data.1

First Data Frame. Each column represents a feature value.

data.2

Second Data Frame. Each column represents a feature value.

method

There are three options for calculating correlation: `pearson`, `kendall`,and `spearman`, with `pearson` being the default.

cor

Correlation threshold, default is 0.5.

pvalue

P-value threshold, default is 0.05.

Value

A data frame containing the calculation results.

Examples


library(biohelpers)

x <- iris[, 1:4]
y <- iris[, 1:4]

cor_and_plot(data.1 = x, data.2 = y) -> result.cor
#> Joining with `by = join_by(from, to)`