Performs SVD on a data matrix using the base svd() function in R, with a workaround to avoid LAPACK errors. If an SVD of the data matrix gives an error, an SVD of its transpose will be performed. Used internally when computing the JIVE decomposition. Credit to Art Owen: https://stat.ethz.ch/pipermail/r-help/2007-October/143508.html.

1 | ```
svdwrapper(x, nu, nv, verbose=F )
``` |

`x` |
a numeric matrix whos SVD decomposition is to be computed. |

`nu` |
the number of left singular vectors to be computed. |

`nv` |
the number of right singular vectors to be computed. |

`verbose` |
logical. Print error message if needed. |

An svd object, as returned by svd(x,nu=nu,nv=nv).

Michael J. O'Connell and Eric F. Lock

1 2 | ```
x<-matrix(rnorm(100),nrow=10,ncol=10)
SVD = svdwrapper(x,nu=1,nv=1)
``` |

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

Please suggest features or report bugs with the GitHub issue tracker.

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