Description Usage Arguments Examples
rename()
changes the names of individual document variables using new_name = old_name
syntax; rename_with()
renames columns using a function.
1 2 3 4 5 | ## 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 |
< |
1 2 3 4 5 6 7 8 9 | 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.