dtm_cor | R Documentation |
Pearson Correlation for Sparse Matrices.
More memory and time-efficient than cor(as.matrix(x))
.
dtm_cor(x)
x |
A matrix, potentially a sparse matrix such as a "dgCMatrix" object
which is returned by |
a correlation matrix
document_term_matrix
x <- data.frame( doc_id = c(1, 1, 2, 3, 4), term = c("A", "C", "Z", "X", "G"), freq = c(1, 5, 7, 10, 0)) dtm <- document_term_matrix(x) dtm_cor(dtm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.