tests/testthat/test-replace_emoticon.R

context("Checking replace_emoticon")
library(lexicon)

test_that("replace_emoticon converts emoticons to words",{

    x <- lexicon::hash_emoticons[[1]][16]

    expect_equal(replace_emoticon(x), " devilish ")

})

Try the textclean package in your browser

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

textclean documentation built on May 2, 2019, 7:22 a.m.