test_that("explain_bot works", {
skip_on_cran()
token <- tweetbotornot2:::create_token_from_secrets()
x <- explain_bot(c("twitter", "jack"), token = token)
expect_true(is.data.frame(x))
expect_true(inherits(x, "data.table"))
expect_true(nrow(x) == 510L)
expect_equal(ncol(x), 6L)
expect_true(all(c("user_id", "screen_name", "prob_bot") %in% names(x)))
x <- data.frame(x = 1:5, y = letters[1:5])
expect_error(explain_bot(x))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.