Functions to persist/load twitteR data to a database

Description

These functions allow a user to store twitteR based data to a database backend as well as retrieving previously stored data

Usage

1
2
3
4
store_tweets_db(tweets, table_name="tweets")
store_users_db(users, table_name="users")
load_users_db(as.data.frame = FALSE, table_name = "users")
load_tweets_db(as.data.frame = FALSE, table_name = "tweets")

Arguments

tweets

A list of status objects to persist to the database

users

A list of user objects to persist to the database

as.data.frame

if TRUE, data will be returned as a data.frame instead of twitteR objects

table_name

The database table to use for storing and loading

Value

store_tweets_db and store_users_db return TRUE of FALSE based on their success or not. The loading functions return either a data.frame of the data (representing the underlying table) or a list of the appropriate twitteR objects.

Author(s)

Jeff Gentry

See Also

register_db_backend, register_sqlite_backend, register_mysql_backend

Examples

1
2
3
4
5
6
7
   ## Not run: 
    register_sqlite_backend("/path/to/sqlite/file")
    tweets = searchTwitter("#scala")
    store_tweets_db(tweets)
    from_db = load_tweets_db()
   
## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.