Displaying 1 result from an estimated 1 matches for "svdtx".
2007 Oct 17
3
Observations on SVD linpack errors, and a workaround
...ter
## works.
## -Art Owen, October 2007
##
svdwrapper = function( x, nu, nv, verbose=T ){
# Caution: I have not tested this much.
# It's here as an example for an R-Help discussion.
gotit = F
try( {svdx = svd(x,nu,nv); gotit=T}, silent = !verbose )
if( gotit )return(svdx)
try( {svdtx = svd(t(x),nv,nu); gotit=T}, silent = !verbose )
if( !gotit )stop("svd(x) and svd(t(x)) both failed.")
if( verbose )print("svd(x) failed but svd(t(x)) worked.")
temp = svdtx$u
svdtx$u = svdtx$v
svdtx$v = temp
svdtx
}