Learn R Programming

colocr (version 0.1.1)

.pearson: Calculate Pearson's Correlation Coefficient

Description

Calculates the Pearson's correlation coefficient between two numeric vectors

Usage

.pearson(r, g)

Arguments

r

A numeric vector

g

A numeric vector

Value

A numeric of length one.

Examples

Run this code
# NOT RUN {
set.seed(123)
r <- rnorm(10)

set.seed(1234)
g <- rnorm(10)

.pearson(r, g)

# }

Run the code above in your browser using DataLab