library(camcos2017) library(magrittr) data(newsgroups) sub0 <- news_subset(newsgroups, filter = c(2,8,12), binary = TRUE, vocab = FALSE) sub0.data <- sub0[[1]] sub0.labels <- sub0[[2]]
Layout of the subset data:
pander::pandoc.table(sub0.data[1:10, ])
x <- colweights(data = sub0.data[,1:3], binary = TRUE, weightfunction = "IDF", sparse = TRUE) %>% similarity("correlation", sparse = TRUE) %>% clustering("DiffusionMap", k = 3, t = 0.5) %>% clustercheck(sub0.labels, k = 3) x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.