relocate.corpus: Change column order of document variables

Description Usage Arguments Examples

View source: R/relocate.R

Description

Use relocate() to change the column positions of document variables, using the same syntax as select() to make it easy to move blocks of columns at once.

Usage

1
2
## S3 method for class 'corpus'
relocate(.data, ...)

Arguments

.data

A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details.

...

<tidy-select> Columns to move.

Examples

1
2
3
4
5
6
7
data_corpus_inaugural %>%
  relocate(President, Party) %>%
  summary(n = 5)

data_corpus_inaugural %>%
  relocate(FirstName, President, .before = Year) %>%
  summary(n = 5)

quanteda/quanteda.tidy documentation built on April 11, 2021, 3:44 p.m.