read_tweets: Read Tweets into a Data Frame

Description Usage Arguments Value Author(s) Examples

View source: R/read.R

Description

Go from a file of raw tweet data to a convenient, {rtweet}-style data frame.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
read_tweets(
  file_path,
  as_tibble = tweetio_as_tibble(),
  verbose = tweetio_verbose(),
  ...
)

read_tweets_bulk(
  file_path,
  as_tibble = tweetio_as_tibble(),
  verbose = tweetio_verbose(),
  in_parallel = TRUE,
  strategy = NULL,
  ...
)

Arguments

file_path

Path(s) to tweet files.

as_tibble

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

verbose

<logical>, Default: tweetio_verbose(). Whether to show diagnostic or progress messages.

...

Arguments passed to or from other methods.

in_parallel

Default: TRUE. Whether to use future.apply::future_lapply() to process the files in parallel. Ignored if {future} or {future.apply} are not installed.

strategy

Default: NULL. argument passed to future::plan()'s strategy parameter. If NULL, future::multiprocess is used. Ignored if {future} or {future.apply} are not installed.

Value

Author(s)

Brendan Knapp brendan.g.knapp@nps.edu

Examples

1
2
3
4
5
6
7
path_to_tweet_file <- example_tweet_file()

tweet_data.table <- read_tweets(file_path = path_to_tweet_file)

tweet_tibble <- read_tweets(file_path = path_to_tweet_file, as_tibble = TRUE)

tweet_tibble

knapply/tweetio documentation built on Dec. 22, 2020, 7:15 p.m.