Description Usage Arguments Value Examples
Prepares data for Twitter bot model
1 | preprocess_bot(x, batch_size = 100, ...)
|
x |
Input data either character vector of Twitter identifiers (user IDs or screen names) or a data frame of Twitter data |
batch_size |
Number of users to process per batch. Relevant if x contains user names or timeline data for more than 100 Twitter users. Because the data processing involves user-level aggregation (grouping by user), it can create computational bottlenecks that are easily avoided by breaking the data into batches of users. Manipulating this number may speed up or slow down data processing, but for most jobs the speed difference is likely negligible, meaning this argument may only be useful if you are working on either a very slow/low-memory machine or very fast/high-memory machine. Default is 100. |
... |
Other arguments are passed on to rtweet functions. This is mostly
just to allow users to specify the Twitter API token, e.g.,
|
Returns a data frame used to generate predictions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
#' ## vector of screen names
x <- c("netflix_bot", "aasfdiouyasdoifu", "madeupusernamethatiswrong",
"a_quilt_bot", "jack", "SHAQ", "aasfdiouyasdoifu5", NA_character_,
"madeupusernamethatiswrong", "a_quilt_bot")
## preprocess_bot - returns features data.table
ftrs <- preprocess_bot(x)
## use features to generate predictions
predict_bot(ftrs)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.