Description Usage Arguments Value Author(s) See Also Examples
normalOffset
is a function that can be used as the
TRANSFORM
argument in an alterMean
operation, which adds
an offset to each value in the mean where the offset is chosen from a
normal distribution.
invGammaMultiple
is a function that can be used as the
TRANSFORM
argument in an alterSD
operation, which multiplies
each standard deviation by a positive value chosen from an inverse gamma
distribution with parameters shape
and scale
.
1 2 | normalOffset(x, delta, sigma)
invGammaMultiple(x, shape, rate)
|
x |
numeric vector of mean expression or standard deviation defined in the object |
delta, sigma |
numeric vector used as |
shape, rate |
numeric vector used as |
normalOffset
returns a new vector, TO each element of which is added
aN offset chosen from a normal distribution with parameters mean
and sd
.
invGammaMultiple
returns a new vector, each element of which is
multiplied by a positive value chosen from an inverse gamma distribution
with parameters shape
and scale
.
Kevin R. Coombes krc@silicovore.com, Jiexin Zhang jiexinzhang@mdanderson.org,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | nComp <- 10
nGenes <- 100
comp <- list()
for (i in 1:nComp) {
comp[[i]] <- IndependentNormal(rnorm(nGenes/nComp, 6, 1.5),
1/rgamma(nGenes/nComp, 44, 28))
}
myEngine <- Engine(comp)
nrow(myEngine)
nComponents(myEngine)
summary(myEngine)
myData <- rand(myEngine, 5)
dim(myData)
summary(myData)
MEAN <- 2
SD <- 2
myEngine.alterMean <- alterMean(myEngine,
function(x) normalOffset(x, MEAN, SD))
myData.alterMean <- rand(myEngine.alterMean, 5)
summary(myData.alterMean)
RATE <- 1
SHAPE <- 2
myEngine.alterSD <- alterSD(myEngine,
function(x) invGammaMultiple(x, SHAPE, RATE))
myData.alterSD <- rand(myEngine.alterSD, 5)
summary(myData.alterSD)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.