rename.corpus | R Documentation |
rename()
changes the names of individual document variables using new_name = old_name
syntax; rename_with()
renames columns using a function.
## S3 method for class 'corpus'
rename(.data, ...)
## S3 method for class 'corpus'
rename_with(.data, .fn, .cols = everything(), ...)
.data |
a quanteda object with document variables |
... |
For For |
.fn |
A function used to transform the selected |
.cols |
< |
data_corpus_inaugural %>%
rename(LastName = President) %>%
summary(n = 5)
data_corpus_inaugural %>%
rename_with(toupper) %>%
summary(n = 5)
data_corpus_inaugural %>%
rename_with(toupper, starts_with("P")) %>%
summary(n = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.