FastCorrelation: Fast way to calculate correlation between variables

Description Usage Arguments Value Author(s) See Also Examples

View source: R/base_FastCorrelation.R

Description

Fast way to calculate correlation between variables

Usage

1
2
FastCorrelation(data, transposition = F, control.markers = NULL,
  target.markers = NULL, method = "pearson")

Arguments

data

a data frame or a matrix

control.markers

control markers

target.markers

target markers

method

a character string indicating which correlation coefficient is to be used for the test. One of "pearson", "kendall", or "spearman", can be abbreviated.

Value

a data frame with p value and adjusted p value.

Author(s)

Weibin Huang<654751191@qq.com>

See Also

cor.test.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data <- state.x77;colnames(data)
a <- FastCorrelation(data,
                     transposition = F,
                     control.markers=NULL,
                     target.markers=NULL,
                     method = "pearson")
a1 <- dplyr::filter(a,adj.P.Val < 0.05)

library(ggplot2)
ggplot(as.data.frame(data),aes(x=`Life Exp`,y=`Murder`)) + geom_point() + geom_smooth()

huangwb8/lucky documentation built on Oct. 16, 2019, 9:01 a.m.