View source: R/parseTweetFiles.R
process_files | R Documentation |
Processes all tweet-files in a directory and saves them in the given directory. This functions filters each files variables, removes symbols, emotes and stopwords, and tags tweets with zip codes if desired.
process_files(tweetdir, outputdir, loc = FALSE, vars = "text",
makedf = TRUE, ...)
tweetdir |
The file directory of tweets to read from. No files other than the tweet files should be in this directory. The tweet files should be in the format as provided by streamR's parseTweets. |
outputdir |
The location to save the tweets to. |
loc |
True if the tweets should be tagged with zip codes. Uses 2014 shapefile from census.gov |
vars |
The variables to filter from the tweet files. |
makedf |
True if a dataframe containing all the edited tweets should be returned, false otherwise. Defaults to true. |
... |
tz and stoplist arguments for the inner clean.tweets call. |
The list of filenames edited.
## Not run: process_files("~/Documents/RawTweets", "~/Documents/EditedTweets")
## Not run: process_files("~/Documents/RawTweets", "~/Documents/EditedTweets", loc = TRUE,
vars = c("text", "time_zone"), tz = c("Eastern Time (US & Canada)", "NA"), stoplist = stoplist)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.