@olof3 comments:
Some thoughts when looking through this. Perhaps change S to Σ in baltrunc for consistency. It seems like it would slightly simplify the code if just Σ was returned, rather than diagm(Σ). An other good reason is for consistency with svd/eigen.