R/tweet_locations.R

Defines functions lat_lon

Documented in lat_lon

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

}
staceaileen/trump_package documentation built on May 26, 2019, 12:32 p.m.