R/tweet_locations.R

library(twitteR)
library(tidytext)
library(dplyr)
library(tidyr)
library(stringr)
library(RCurl)


#' Retrieve location data for tweets about Donald Trump
#'
#' @return Data of latitude and longitudes of tweet data
#' @export
lat_lon <- function() {

  d <- tweets()

  tweet_loc = data.frame(lon = d$longitude, lat = d$latitude)

  tweet_loc

}
lukemcphillips/trumppackage2.0 documentation built on May 7, 2019, 10:59 a.m.