Converts to the simple triplet matrix representation used by the slam package. This is the format used internally by tm.
type="lda"
Converts to the format used by the lda package. This is a very minor change as the format in stm is based on lda's data representation. The difference as noted in stm involves how the numbers are indexed. Accordingly this type returns a list containing the new documents object and the unchanged vocab object.
type="Matrix"
Converts to the sparse matrix representation used by Matrix. This is the format used internally by numerous other text analysis packages.
If you want to write out a file containing the sparse matrix representation popularized by David Blei's C code ldac see the function writeLdac.