multi.data.cor: Calculates differential correlation statistics for all the...

Description Usage Arguments Value Author(s) Examples

View source: R/multi.data.cor.r

Description

Requires grouping variable to contain 2 groups. Requires same samples across datasets (arranged in same order). Declare columns (descriptors) column to both datasets.

Usage

1
2
multi.data.cor(data1, data2, sample_col, common_cols, group,
  ordered = "fisher", limit = NA)

Arguments

data1

first dataframe

data2

second dataframe

sample_col

character string defining the sample or identifying column in both dataframes

group

character string defining the grouping variable for comparative differential correlations

ordered

character string defining the variable to order output by. Choose from g1cor, g1p, g2cor, g2r, fisher (default) and BH.

limit

numeric input to limit number of output correlation pairings

Value

a table (or dataframe) with the correlation coefficients, p-values, fisher r-to-z statistic and BH p-value correlation for each correlation pair

Author(s)

Emily Mears, mears.emilyrose@gmail.com, Matthew Grant, mgra576@aucklanduni.ac.nz

Ben Day, benjamindayengineer@gmail.com

Examples

1
2
3
4
5
6
7
## Load example dataframes
df1 <- read.csv("example_data/excorr_df1.csv")
df2 <- read.csv("example_data/excorr_df2.csv")

## Run function
multi.data.cor(df1, df2, sample_col = "sample", common_cols = c("sex", "sample"), group = "sex")
multi.data.cor(df1, df2, sample_col = "sample", common_cols = c("sex", "sample"), group = "sex", ordered = "Group_2_Pvalue", limit = 100)

emily5/exCorr documentation built on May 22, 2020, 1:01 p.m.