scaleOffset {edgeR} | R Documentation |
Ensures scale of offsets are consistent with library sizes.
## S3 method for class 'DGEList' scaleOffset(y, offset, ...) ## Default S3 method: scaleOffset(y, offset, ...)
y |
numeric vector or matrix of counts, or a |
offset |
numeric vector or matrix of offsets to be scaled. |
... |
other arguments that are not currently used. |
scaleOffset
ensures that the scale of offsets are consistent with library sizes.
This is done by ensuring that the mean offset for each gene is the same as the mean log-library size.
The length or dimensions of offset
should be consistent with the number of libraries in y
.
numeric vector or matrix of scaled offsets.
Aaron Lun, Yunshun Chen
y <- matrix(rnbinom(40,size=1,mu=100),10,4) offset <- rnorm(4) scaleOffset(y, offset)