I am trying to convert tweets into a tidy text format with the following format and code:
## Convert twitter into a tidy text format where the unit of analysis is the ##`tweet_id-handle-time_stamp-word`
tidy_format = trump_clinton_tweets %>% mutate(tweet_id = row_number()) %>%
tidy_format = tidy_format %>% group_by(tweet_id) %>% unnest_tokens(word, text, token = "tweets") %>%
glimpse(tidy_format)
And I keep getting this error:
"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"
Print the tweets which are being cleaned and you will come to know which tweet is producing error, most probably there will be empty strings as tweets which are causing this error.