tweethead: Tweet Headlines

Description Usage Arguments Details Value References Examples

View source: R/tweethead.R

Description

Tweet the latest headlines from the specified website. rtweet and RCurl packages required.

Usage

1
tweethead(posttweet = TRUE, username = NULL, website = NULL, save = FALSE)

Arguments

posttweet

A logical scalar indicating if tweets should be posted, default TRUE.

username

A character scalar, giving the name of the twitter user. The default, NULL, uses information stored in local .Renviron file.

website

A character scalar, giving the name of the website, from which to pull headlines. The default, NULL, uses information stored in local .Renviron file.

Details

This function is customized to work on a particular website. It's not for general use.

Value

A list of length 3. The first element is a data frame of old tweets with text, favoriteCount, retweetCount, and createdUTC (date/time) as columns. The second and third elements are character strings of the current headlines (currentheads) and the latests items to tweet (totweet).

References

Simon Munzert. 19 Jan 2015. Programming a Twitter bot - and the rescue from procrastination. http://www.r-datacollection.com/blog/Programming-a-Twitter-bot/

Simon Munzert. 21 Dec 2014. How to conduct a tombola with R. www.r-datacollection.com/blog/How-to-conduct-a-tombola-with-R/

Examples

1
2
3
4
5
## Not run: 
tweethead(FALSE)
tweethead()

## End(Not run)

JVAdams/jvamisc documentation built on Aug. 11, 2021, 6:43 a.m.