dns2stm | R Documentation |
Dense matrix to Simple Triplet-Matrix
dns2stm(dns, memory = NULL) ## S3 method for class 'data.frame' as.simple_triplet_matrix(df, memory = NULL, force = FALSE)
dns |
a full dense |
memory |
(num) the maximum ammount of memory (RAM + virtual) the sistem is required to reserve for the proces. Default is to use standard R option and so provide "memory.limit()" |
df |
a data frame to be converted in STM |
force |
(lgl) flag (default = FALSE) to force the use also for non-weihted data frames |
an object of classes
link[tm]{DocumentTermMatrix}
and
link[slma]{simple_triplet_matrix}
library(slam) data("liu_dtm") liu_full_matrix <- stm2dns(liu_dtm) identical(liu_dtm, slam::as.simple_triplet_matrix(liu_full_matrix))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.