0

I am just wondering why I cant use group_by() in corpus-text. I tried using some packages too but at the end nothing. Also tried to convert to tibble.

My code:

data <- data %>%
  group_by(Title) %>%
  mutate(line = row_number()) %>%
  ungroup()

The output:

Error:
! All columns in a tibble must be vectors.
✖ Column `text` is a `corpus_text` object.
Run `rlang::last_error()` to see where the error occurred. 
Progman
  • 16,827
  • 6
  • 33
  • 48
kiyana
  • 1
  • 1
  • Can you please share the data in the `data` object? See this for some help on sharing data on SO: https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Harrison Jones Jan 04 '23 at 16:02
  • Please provide enough code so others can better understand or reproduce the problem. – Community Jan 09 '23 at 13:00

0 Answers0