# Signal balancing using SVD: notations and implementation in R

Hibbs et. al use SVD to balance the strength of different underlying signals in gene expression data using the following decomposition:

$X_{m*n} = U_{m*n} \Sigma_{n*n} V^T_{n*n}$

In this case $U$ has the same dimensions as $X$, so the way that they see $U$ as a balanced projection of $X$ makes sense.

I'd like to use the same approach in R. However, the svd package decomposes $X$ into $D_{m}, U_{m*m}, V_{n*m}$. This is not too surprising given that Mathworld also mentions different conventions, however, I see no equivalent for the $U$ matrix of the first definition.

Is there an R implementation of Press' definition available, or is there a way to convert one in the other?

In $X=UDV^t$, $D$ is diagonal, and only the upper-left square of $D$, of size $\min(m,n)\times\min(m,n)$, is non-zero.
The two SVD decompositions are equivalent in the sense that if you drop the right-most zero columns (or bottom-most zero rows) from $D$, and also drop the corresponding rows/columns from $U$ or $V$, you get the other definition of SVD.