Build a data frame of statuses where each is summarized in a single row. The values of each column hold the most recent non-NA/non-empty value.

extract_statuses(tweet_df, as_tibble = tweetio_as_tibble(), ...)

# S3 method for data.frame
extract_statuses(tweet_df, as_tibble = tweetio_as_tibble(), ...)

# S3 method for data.table
extract_statuses(tweet_df, as_tibble = tweetio_as_tibble(), ...)

Arguments

tweet_df

A data frame of tweets, as obtained by read_tweets() or one of {rtweet}'s collection functions, e.g. rtweet::search_tweets().

as_tibble

<logical>, Default: tweetio_as_tibble(). Whether a tibble::tibble() should be returned. Ignored if the {tibble} package is not installed.

...

Arguments passed to or from other methods.

Examples

path_to_tweet_file <- example_tweet_file() tweet_df <- read_tweets(path_to_tweet_file) extract_statuses(tweet_df, as_tibble = TRUE)
#> # A tibble: 1,248 x 17 #> status_id status_url created_at text source is_quote is_retweeted #> <chr> <chr> <dttm> <chr> <chr> <lgl> <lgl> #> 1 11780103… https://t… 2019-09-28 18:15:22 "RT … Twitt… FALSE FALSE #> 2 11780103… https://t… 2019-09-28 18:15:20 "RT … Twitt… FALSE FALSE #> 3 11780103… https://t… 2019-09-28 18:15:20 "@al… Twitt… FALSE FALSE #> 4 11780103… https://t… 2019-09-28 18:15:18 "Gen… Twitt… TRUE FALSE #> 5 11780103… https://t… 2019-09-28 18:15:17 "RT … Twitt… TRUE FALSE #> 6 11780102… https://t… 2019-09-28 18:15:14 "I'm… Twitt… TRUE FALSE #> 7 11780102… https://t… 2019-09-28 18:15:13 "@tr… Twitt… FALSE FALSE #> 8 11780102… https://t… 2019-09-28 18:15:13 "RT … Twitt… FALSE FALSE #> 9 11780102… https://t… 2019-09-28 18:15:13 "@hi… Twitt… FALSE FALSE #> 10 11780102… https://t… 2019-09-28 18:15:12 "RT … Twitt… TRUE FALSE #> # … with 1,238 more rows, and 10 more variables: media_url <list>, #> # media_type <list>, place_url <chr>, place_name <chr>, #> # place_full_name <chr>, place_type <chr>, country <chr>, country_code <chr>, #> # bbox_coords <list>, status_type <chr>