Learn R Programming

rsgcc (version 1.0.6)

onegcc: compute one Gini correlation coefficient

Description

onegcc calcluates one Gini correlation coefficient with rank information of the first variable.

Usage

onegcc(x, y)

Arguments

x
a numeric vector.
y
a numeric vector with the same length of x.

Value

Gini correlation coefficient (a numeric value ranged from -1.0 to 1.0).

Details

This is a generic function cacluating correlation with rank information of the first variable and the actual value information of the second variable.

Examples

Run this code

   data(rsgcc)
   x <- rnaseq[1:10,]     #Just use a small subset of RNA-Seq data 
   onegcc(x[1,], x[2,])   # generate one correlaiton for one gene pair
   onegcc(x[2,], x[1,])   # generate the other correlaiton for the same gene pair

Run the code above in your browser using DataLab