Description Usage Arguments Value Author(s) Examples
View source: R/multi.data.cor.r
Requires grouping variable to contain 2 groups. Requires same samples across datasets (arranged in same order). Declare columns (descriptors) column to both datasets.
1 2 | multi.data.cor(data1, data2, sample_col, common_cols, group,
ordered = "fisher", limit = NA)
|
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 |
limit |
numeric input to limit number of output correlation pairings |
a table (or dataframe) with the correlation coefficients, p-values, fisher r-to-z statistic and BH p-value correlation for each correlation pair
Emily Mears, mears.emilyrose@gmail.com, Matthew Grant, mgra576@aucklanduni.ac.nz
Ben Day, benjamindayengineer@gmail.com
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.