mutate.corpus | R Documentation |
mutate()
adds new document variables and preserves
existing ones; transmute()
adds new document variables and drops existing
ones. Both functions preserve the number of rows of the input. New variables
overwrite existing variables of the same name.
## S3 method for class 'corpus'
mutate(.data, ...)
## S3 method for class 'corpus'
transmute(.data, ...)
.data |
a quanteda object whose document variables will be created or transformed |
... |
name-value pairs of expressions for document variable modification or assignment; see mutate. |
data_corpus_inaugural %>%
mutate(fullname = paste(FirstName, President, sep = ", ")) %>%
summary(n = 5)
data_corpus_inaugural %>%
transmute(fullname = paste(FirstName, President, sep = ", ")) %>%
summary(n = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.