tests/testthat/test-uncombine.R

context("Checking uncombine")

test_that("uncombine ...",{

    mytext <- get_sentences(c(
       'do you like it?  But I hate really bad dogs',
       'I am the best friend.',
       'Do you really like it?  I\'m not happy'
    ))

    x <- sentiment_by(mytext)
    y <- uncombine(x)
    expect_true(nrow(x) < nrow(y))
    expect_true(is(y, "data.table"))

})

Try the sentimentr package in your browser

Any scripts or data that you put into this service are public.

sentimentr documentation built on Oct. 12, 2021, 9:06 a.m.