0

I am new to R and been trying to tokenize a data.frame using unnest_tokens. My data.frame was obtained from a csv file and has the following column :

ID, TITLE, DESCRIPTION, OUTCOMES, DATE .

I WISH TO TOKENIZE THE TITLE, SO I MADE ANOTHER DATAFRAME :

only_t<-dplyr::select(mydata,title)
up_dat<-data.frame(1:2156, document= only_t)

Followed by I did :

up_dat %>%
  tidytext::unnest_tokens(word, document)

When I did this , I get an error stating :

Error in check_input(x) : Input must be a character vector of any length or a list of character vectors, each of which has a length of 1.

Would appreciate any help in this. I been stuck here forever .

Harun Guna
  • 129
  • 1
  • 1
  • 7
  • 1
    Please take a look at [How to make a great R reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example), to modify your question, with a smaller sample taken from your data (check `?dput()`). Posting images of your data or no data makes it difficult to impossible for us to help you! – massisenergy Feb 24 '20 at 16:03
  • Check this out : https://stackoverflow.com/questions/57465241/error-in-check-inputx-input-must-be-a-character-vector-of-any-length-or-a-li – Shubham Pujan Feb 24 '20 at 16:07
  • hey @ShubhamPujan I looked into it and I have the issue with my tibble . # A tibble: 2,156 x 2 X1.2156 title . Considering i need to convert it into a character using mutate. – Harun Guna Feb 24 '20 at 16:31

0 Answers0