rowwiseRandomNormal: Generate a data frame where each row follows a custom random...

Description Usage Arguments Details Value Author(s) Examples

Description

Generate a data frame where each row contains random normal values with the same mean and standard deviation as the corresponding row in the input data frame.

Usage

1

Arguments

x

A matrix or data frame

Details

First version: 2015-03 Last modification: 2015-03

Value

A data frame of same dimensions as the input matrix/data frame, with random normal values generated in a row-wise way.

Author(s)

Jacques van Helden (Jacques.van-Helden@univ-amu.fr)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Load example data set from Den Boer, 2009
library(denboer2009)
data(denboer2009.expr)     ## Load expression table
data(denboer2009.pheno)    ## Load phenotypic data

## Define group labels and group of interest
g <- denboer2009.pheno$sample.labels
goi <- "Bh" ## Select one cancer subtype as group of interest

## Generate row-wise normal values
denboer2009.rnorm <- rowwiseRandomNormal(x=denboer2009.expr)

## Run Welch test on the row-wise permuted values
rnorm.welch <- meanEqualityTests(denboer2009.rnorm, 
                                 g=denboer2009.pheno$sample.labels, 
                                 goi="Bh",
                                 selected.tests="welch"
                                 )
               
## Draw volcano plot of Welch test result with the random values.
## This should show more or less no significant features.
meanEqualityTests.plotVolcano(rnorm.welch, test="welch", main="Random normal values, Welch volcano")

jvanheld/stats4bioinfo documentation built on May 20, 2019, 5:16 a.m.