Learn R Programming

RNentropy (version 1.2.3)

RN_calc_GPV: RN_calc_GPV

Description

This function calculates global p-values from expression data, represented as -log10(p-values).

Usage

RN_calc_GPV(X, bind = TRUE)

Arguments

X

data.frame with expression values. It may contain additional non numeric columns (eg. a column with gene names)

bind

See Value (Default: TRUE)

Value

If bind is TRUE the function returns a data.frame with the original expression values from 'X' and an attached column with the -log10() of the global p-value, otherwise only the numeric vector of -log10(p-values) is returned.

Examples

Run this code
# NOT RUN {
data("RN_Brain_Example_tpm")
GPV <- RN_calc_GPV(RN_Brain_Example_tpm)

## The function is currently defined as
function (X, bind = TRUE) 
{
    rnums <- sapply(X, is.numeric)
    GL_LPV <- apply(X[rnums], 1, ".RN_calc_GPV_row")
    if (bind) {
        GPV <- cbind(X, GL_LPV)
        return(GPV)
    }
    else {
        return(GL_LPV)
    }
  }
# }

Run the code above in your browser using DataLab