Learn R Programming

TrustVDJ (version 0.1.0)

corTest: Test for Correlation

Description

Correlation analysis for each row (each to each) between two data-frames.

Usage

corTest(x, y, method = "both", adj_method = "BH", rm0 = TRUE)

Arguments

x

data.frame.

y

data.frame.

method

character. 'pearson', 'spearman' or 'both'. Default 'both'

adj_method

character. choose one method in p.adjust.methods. Default 'BH'

rm0

logical. whether remove 0 in each analyse. Default TRUE.

Value

a correlation results data.frame

Examples

Run this code
# NOT RUN {
treatment = data.frame(S1 = sample(10, 5), S2 = sample(10, 5), S3 = sample(10, 5))
control   = data.frame(S4 = sample(20, 5), S5 = sample(20, 5), S6 = sample(10, 5))
result    = corTest(treatment, control, method = 'pearson')
head(result)

# }

Run the code above in your browser using DataLab