Learn R Programming

quanteda.tidy (version 0.4)

dplyr_cols: Verbs that operate on columns

Description

These functions operate on the columns (document variables) of quanteda objects, creating, modifying, renaming, reordering, or selecting document variables.

Value

A corpus with modified document variables, or for pull(), a vector.

Arguments

.data

a quanteda corpus object

...

additional arguments passed to methods

Details

mutate() creates new document variables or modifies existing ones. transmute() creates new document variables and drops existing ones. See dplyr::mutate() for more details.

pull() extracts a single document variable as a vector. See dplyr::pull() for more details.

relocate() changes the column order of document variables. See dplyr::relocate() for more details.

rename() changes the names of individual document variables using new_name = old_name syntax. rename_with() renames document variables using a function. See dplyr::rename() for more details.

select() keeps or drops document variables by name. See dplyr::select() for more details.