get_documents: Get Documents Based on Cluster Assignment in 'assign_cluster'

Description Usage Arguments Value Examples

View source: R/get_documents.R

Description

Get the documents associated with each of the k clusters .

Usage

1
2
3
4
get_documents(x, ...)

## S3 method for class 'assign_cluster'
get_documents(x, ...)

Arguments

x

A assign_cluster object.

...

ignored.

Value

Returns a list of vectors of document names.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(dplyr)

mydocuments1 <- presidential_debates_2012 %>%
    with(data_store(dialogue, paste(person, time, sep="-"))) %>%
    hierarchical_cluster() %>%
    assign_cluster(k = 6) %>%
    get_documents()

mydocuments1

mydocuments2 <- presidential_debates_2012 %>%
    with(data_store(dialogue)) %>%
    hierarchical_cluster() %>%
    assign_cluster(k = 55) %>%
    get_documents()

mydocuments2

trinker/hclustext documentation built on May 27, 2017, 1:47 p.m.