Learn R Programming

twitteR (version 1.1.9)

load_tweets_db: 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

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.

See Also

register_db_backend, register_sqlite_backend, register_mysql_backend

Examples

Run this code
   ## Not run: 
#     register_sqlite_backend("/path/to/sqlite/file")
#     tweets = searchTwitter("#scala")
#     store_tweets_db(tweets)
#     from_db = load_tweets_db()
#    ## End(Not run)

Run the code above in your browser using DataLab