View source: R/create_tweet_features.R
compute_tweet_features | R Documentation |
Internal helper to create_tweet_features
compute_tweet_features(
x,
.as.data.table = TRUE,
.mentions.regexp = "(?<=^|\\W)(@\\w{1,15})(?=\\s|$|\\W)",
.hashtags.regexp = "(?<=\\.|^|\\s)(#\\w{1,139})(?=\\s|$|\\W)",
.url.regexp = "\\b(([a-z][\\w-]+:(/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)([^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\\'\\\".,<>?«»“”‘’]))"
)
x |
a |
.as.data.table |
logical. Whether or not to return a |
.mentions.regexp |
unit-length character vector,
specifying the regular expression pattern used to match, count, and remove
mentions in the tweet text (applied to column |
.hashtags.regexp |
unit-length character vector,
specifying the regular expression pattern used to match, count, and remove
hashtags in the tweet text (applied to column |
.url.regexp |
unit-length character vector,
specifying the regular expression pattern used to match, count, and remove
URLs in the tweet text (applied to column |
A data.table
if .as.data.table = TRUE
(default),
otherwise a tibble
.
The return object contains all columns contained in x
plus
the created tweet features.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.