Learn R Programming

tweet2r (version 1.1)

t2SpatialPointDataFrame: Extract geotagged tweets stored as a data.frame

Description

A function to create a SpatialPointsDataFrame with only the tweets with lat lon columns filled. Not all the tweets are geotagged. Tweets should be subset from the original data.frame to get only tweets with coordinates.

Usage

t2SpatialPointDataFrame(tweets)

Arguments

tweets

A data.frame with tweets.

Value

geotweets

Return geotagged tweets as a SpatialPointsDataFrame.

Details

Tweets data.frame can be created with the function t2DataFrame

See Also

tweet2r, t2DataFrame, sp

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
  #tweets data.frame
  tweets="tweets"
  
  #function to extract only geotagged tweets a SpatialPointsDataFrame
  geotweets<-t2SpatialPointDataFrame(tweets)
  
# }

Run the code above in your browser using DataLab