fold.change | R Documentation |
Calculates the fold changes between two numerical matrices row by row.
fold.change(d1, d2, BIG = 1e4)
d1 |
The first data matrix. |
d2 |
The second data matrix. |
BIG |
A number representing a big value of the result, i.e. black-and-white regulation. |
The two matrices d1
and d2
must have the same number of rows.
A positive value means up-regulation where the average of d2
is higher than that of d1
. Conversely, a negative value means down-regulation where the the average of d1
is higher than that of d2
. If one group contains all zeros, a positive or negative BIG
value is returned.
A vector of fold changes is returned.
Thang V. Pham
Pham TV (2021). countdata: The Beta-Binomial Test for Count Data. R package version 1.1. https://CRAN.R-project.org/package=countdata
x <- rbind(c(1.5, 1.2, 10.2),
c(9.1, 2.2, 8.1))
fold.change(x, 2 * x)
# returns a column vector of 2
fold.change(x, 0.5 * x)
# returns a column vector of -2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.