merge_dsm: Merge Rows or Columns from Different DSM Objects (wordspace)

Description Usage Arguments Value Author(s)


Warning: this function will be revised in the next release of the wordspace package


  ## S3 method for class 'dsm'
merge(x, y, ..., rows=TRUE, all=FALSE, term.suffix=NULL)


x, y, ...

two or more objects of class dsm to be merged


whether to merge rows (TRUE, default) or columns (FALSE) of the DSM matrices


if FALSE (default), only features shared by all DSMs are included in the merged DSM (or target terms with rows=FALSE). If TRUE, all features are included with missing frequency / score values replaced by zero (analogously for target terms with rows=FALSE). This option is not implemented yet.


optional character vector specifying one suffix string for each DSM, which will be appended to row (rows=TRUE) or column (rows=FALSE) labels in order to make them unique


if term.suffix is specified, row information of returned DSM object will be extended with variables orig.term specifying the original terms and orig.part specifying the original component model (identified by the corresponding entry from term.suffix)


Stefan Evert (

Search within the wordspace package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

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

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