Description Usage Arguments Value Examples
This is to convert objects conveniently. The three types of matrix are 1st, "matrix"; 2nd, "dgCMatrix" in package Matrix; 3rd, "simple_triplet_matrix", "DocumentTermMatrix", "TermDocumentMatrix" in package slam, tm. This function is to be used when you read a csv file and want it to be a dtm; or, when you have a very large dtm and you want it to be saved or passed to another function that deals with dgCMatrix object. Note, it cannot convert between simple_triplet_matrix on one side, and dtm or tdm on the other.
1 |
x |
object of class matrix, dgCMatrix, simple_triplet_matrix, DocumentTermMatrix, TermDocumentMatrix. |
to |
to what class do you want to convert |
keep_name |
whether to keep names or
dimnames, which are, for dtm-like object,
documents and terms. |
the object whose class is specified by argument to
.
1 2 3 4 5 6 7 8 |
Warning messages:
1: In Sys.setlocale(category = "LC_COLLATE", s_right_locale) :
OS reports request to set locale to "zh_CN.UTF-8" cannot be honored
2: In Sys.setlocale(category = "LC_CTYPE", s_right_locale) :
OS reports request to set locale to "zh_CN.UTF-8" cannot be honored
Warning messages:
1: In Sys.setlocale(category = "LC_COLLATE", s_right_locale) :
OS reports request to set locale to "zh_CN.UTF-8" cannot be honored
2: In Sys.setlocale(category = "LC_CTYPE", s_right_locale) :
OS reports request to set locale to "zh_CN.UTF-8" cannot be honored
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.