This function is borrowed from DESeq.

1 | ```
estimateSizeFactorsForMatrix(counts, locfunc = median)
``` |

`counts` |
a matrix or data frame of counts, i.e., non-negative integer values |

`locfunc` |
a function to compute a location for a sample. By default, the median is used. |

Given a matrix or data frame of count data, this function estimates the size factors as follows: Each column is divided by the geometric means of the rows. The median (or, if requested, another location estimator) of these ratios (skipping the genes with a geometric mean of zero) is used as the size factor for this column. Typically, you will not call this function directly.

a vector with the estimates size factors, one element per column

Simon Anders

Simon Anders, Wolfgang Huber: Differential expression analysis for sequence count data. Genome Biology 11 (2010) R106, http://dx.doi.org/10.1186/gb-2010-11-10-r106

1 2 3 | ```
data(simuN5)
dat <- simuN5
estimateSizeFactorsForMatrix(dat$counts)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.