arrange.corpus | R Documentation |
Order the documents in a corpus by variables, including document variables.
## S3 method for class 'corpus'
arrange(.data, ...)
.data |
a corpus object whose documents will be sorted |
... |
comma-separated list of unquoted document variables, or expressions involving document variables. Use desc to sort a variable in descending order. |
arrange(data_corpus_inaugural[1:5], President)
arrange(data_corpus_inaugural[1:5], c(3, 2, 1, 5, 4))
arrange(data_corpus_inaugural[1:5], desc(President))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.