library(textTinyR)
tok_lst = list(c('the', 'the', 'tokens', 'of', 'first', 'document'),
c('the', 'tokens', 'of', 'of', 'second', 'document'),
c('the', 'tokens', 'of', 'third', 'third', 'document'))
vec_clust = rep(1:6, 3)
res = cluster_frequency(tok_lst, vec_clust)
Run the code above in your browser using DataLab