correlation: Correlation

correlationR Documentation

Correlation

Description

This function returns correlation coefficients for variables in one dataset against variables in a second dataset

Usage

correlation(
  data1,
  data2,
  method,
  format = c("ComputeResult", "data.table"),
  verbose = c(TRUE, FALSE),
  ...
)

## S4 method for signature 'data.table,data.table'
correlation(
  data1,
  data2,
  method = c("spearman", "pearson"),
  format = c("ComputeResult", "data.table"),
  verbose = c(TRUE, FALSE)
)

## S4 method for signature 'data.table,missingOrNULL'
correlation(
  data1,
  data2,
  method = c("spearman", "pearson", "sparcc"),
  format = c("ComputeResult", "data.table"),
  verbose = c(TRUE, FALSE)
)

## S4 method for signature 'CollectionWithMetadata,missingOrNULL'
correlation(
  data1,
  data2,
  method = c("spearman", "pearson"),
  format = c("ComputeResult", "data.table"),
  verbose = c(TRUE, FALSE),
  proportionNonZeroThreshold = 0.05,
  varianceThreshold = 0,
  stdDevThreshold = 0,
  metadataIsFirst = c(FALSE, TRUE)
)

## S4 method for signature 'Collection,Collection'
correlation(
  data1,
  data2,
  method = c("spearman", "pearson"),
  format = c("ComputeResult", "data.table"),
  verbose = c(TRUE, FALSE),
  proportionNonZeroThreshold = 0.05,
  varianceThreshold = 0,
  stdDevThreshold = 0
)

Arguments

data1

first dataset. A data.table

data2

second dataset. A data.table

method

string defining the type of correlation to run. The currently supported values are specific to the class of data1 and data2.

format

string defining the desired format of the result. The currently supported values are 'data.table' and 'ComputeResult'.

verbose

boolean indicating if timed logging is desired

Value

data.frame with correlation coefficients or a ComputeResult object

data.frame with correlation coefficients


VEuPathDB/veupathUtils documentation built on Feb. 8, 2025, 12:29 p.m.