Running 'testthat.R' [2s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(RSentiment)
  > 
  > test_check("RSentiment")
  -- 1. Error: calculate_score is score of sentences (@testing.R#15)  ------------
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: expect_equal(expect_list_equal(calculate_score(c("This is very good", "This is bad")), 
         c(2, -1)), 0) at testthat/testing.R:15
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: expect_list_equal(calculate_score(c("This is very good", "This is bad")), c(2, -1))
  5: setdiff(t, s) at testthat/testing.R:6
  6: as.vector(x)
  7: calculate_score(c("This is very good", "This is bad"))
  8: getpolarity(text, negative_words, positive_words)
  9: plyr::laply(sentences, function(sentence, negative_words, positive_words) {
         if (is.na(sentence)) 
             return(NA)
         if (regexpr("[?]", sentence) > 0) 
             return(99)
         if (grepl(":-(", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "bad", sep = " ")
         else if (grepl(":-)", sentence, fixed = TRUE) || grepl(":)", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "good", sep = " ")
         else if (grepl(":-D", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "very good", sep = " ")
         else if (grepl(":-|", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "indifferent", sep = " ")
         else if (grepl(":-X", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "very bad", sep = " ")
         else sentence <- paste(sentence, "", sep = "")
         sentence <- iconv(sentence, "WINDOWS-1252", "UTF-8")
         trim <- function(x) gsub("^\\s+|\\s+$", "", x)
         sentence <- gsub("n't", " not", sentence)
         sentence <- trim(sentence)
         sentence <- gsub("[[:punct:]]", "", iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- gsub("[[:cntrl:]]", "", iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- stringr::str_trim(iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- tolower(sentence)
         wordList <- stringr::str_split(sentence, "\\s+")
         words <- unlist(wordList)
         positive.matches <- match(words, positive_words)
         negative.matches <- match(words, negative_words)
         positive_matches <- !is.na(positive.matches)
         negative_matches <- !is.na(negative.matches)
         score <- sum(positive_matches) - sum(negative_matches)
         very.matches <- match(words, c("very", "most", "more"))
         very_matches <- !is.na(very.matches)
         if (score >= 0) 
             score <- score + sum(very_matches)
         else score <- score - sum(very_matches)
         negation.matches <- match(words, negation)
         negation_matches <- !is.na(negation.matches)
         print(paste("Processing sentence:", sentence, sep = " "))
         if (sum(negation_matches) > 0) 
             score <- POStag(sentence, words)
         return(score)
     }, negative_words, positive_words)
  10: llply(.data = .data, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts)
  11: structure(lapply(pieces, .fun, ...), dim = dim(pieces))
  12: lapply(pieces, .fun, ...)
  13: FUN(X[[i]], ...)
  14: stringr::str_trim
  15: getExportedValue(pkg, name)
  16: asNamespace(ns)
  17: getNamespace(ns)
  18: tryCatch(loadNamespace(name), error = function(e) stop(e))
  19: tryCatchList(expr, classes, parentenv, handlers)
  20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  21: value[[3L]](cond)
  
  -- 2. Error: calculate_sentiment is sentiment of sentences (@testing.R#21)  ----
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: expect_equal(expect_list_equal(calculate_sentiment(c("This is very good", "This is bad")), 
         df), 0) at testthat/testing.R:21
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: expect_list_equal(calculate_sentiment(c("This is very good", "This is bad")), df)
  5: setdiff(t, s) at testthat/testing.R:6
  6: as.vector(x)
  7: calculate_sentiment(c("This is very good", "This is bad"))
  8: calculate_score(text)
  9: getpolarity(text, negative_words, positive_words)
  10: plyr::laply(sentences, function(sentence, negative_words, positive_words) {
         if (is.na(sentence)) 
             return(NA)
         if (regexpr("[?]", sentence) > 0) 
             return(99)
         if (grepl(":-(", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "bad", sep = " ")
         else if (grepl(":-)", sentence, fixed = TRUE) || grepl(":)", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "good", sep = " ")
         else if (grepl(":-D", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "very good", sep = " ")
         else if (grepl(":-|", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "indifferent", sep = " ")
         else if (grepl(":-X", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "very bad", sep = " ")
         else sentence <- paste(sentence, "", sep = "")
         sentence <- iconv(sentence, "WINDOWS-1252", "UTF-8")
         trim <- function(x) gsub("^\\s+|\\s+$", "", x)
         sentence <- gsub("n't", " not", sentence)
         sentence <- trim(sentence)
         sentence <- gsub("[[:punct:]]", "", iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- gsub("[[:cntrl:]]", "", iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- stringr::str_trim(iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- tolower(sentence)
         wordList <- stringr::str_split(sentence, "\\s+")
         words <- unlist(wordList)
         positive.matches <- match(words, positive_words)
         negative.matches <- match(words, negative_words)
         positive_matches <- !is.na(positive.matches)
         negative_matches <- !is.na(negative.matches)
         score <- sum(positive_matches) - sum(negative_matches)
         very.matches <- match(words, c("very", "most", "more"))
         very_matches <- !is.na(very.matches)
         if (score >= 0) 
             score <- score + sum(very_matches)
         else score <- score - sum(very_matches)
         negation.matches <- match(words, negation)
         negation_matches <- !is.na(negation.matches)
         print(paste("Processing sentence:", sentence, sep = " "))
         if (sum(negation_matches) > 0) 
             score <- POStag(sentence, words)
         return(score)
     }, negative_words, positive_words)
  ...
  13: lapply(pieces, .fun, ...)
  14: FUN(X[[i]], ...)
  15: stringr::str_trim
  16: getExportedValue(pkg, name)
  17: asNamespace(ns)
  18: getNamespace(ns)
  19: tryCatch(loadNamespace(name), error = function(e) stop(e))
  20: tryCatchList(expr, classes, parentenv, handlers)
  21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  22: value[[3L]](cond)
  
  -- 3. Error: calculate_total_prsence_sentiment is sentiment of sentences (@testi
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: expect_equal(expect_list_equal(calculate_total_presence_sentiment(c("This is very good", 
         "This is bad")), score_array), 0) at testthat/testing.R:39
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: expect_list_equal(calculate_total_presence_sentiment(c("This is very good", "This is bad")), 
         score_array)
  5: setdiff(t, s) at testthat/testing.R:6
  6: as.vector(x)
  7: calculate_total_presence_sentiment(c("This is very good", "This is bad"))
  8: calculate_score(text)
  9: getpolarity(text, negative_words, positive_words)
  10: plyr::laply(sentences, function(sentence, negative_words, positive_words) {
         if (is.na(sentence)) 
             return(NA)
         if (regexpr("[?]", sentence) > 0) 
             return(99)
         if (grepl(":-(", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "bad", sep = " ")
         else if (grepl(":-)", sentence, fixed = TRUE) || grepl(":)", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "good", sep = " ")
         else if (grepl(":-D", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "very good", sep = " ")
         else if (grepl(":-|", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "indifferent", sep = " ")
         else if (grepl(":-X", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "very bad", sep = " ")
         else sentence <- paste(sentence, "", sep = "")
         sentence <- iconv(sentence, "WINDOWS-1252", "UTF-8")
         trim <- function(x) gsub("^\\s+|\\s+$", "", x)
         sentence <- gsub("n't", " not", sentence)
         sentence <- trim(sentence)
         sentence <- gsub("[[:punct:]]", "", iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- gsub("[[:cntrl:]]", "", iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- stringr::str_trim(iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- tolower(sentence)
         wordList <- stringr::str_split(sentence, "\\s+")
         words <- unlist(wordList)
         positive.matches <- match(words, positive_words)
         negative.matches <- match(words, negative_words)
         positive_matches <- !is.na(positive.matches)
         negative_matches <- !is.na(negative.matches)
         score <- sum(positive_matches) - sum(negative_matches)
         very.matches <- match(words, c("very", "most", "more"))
         very_matches <- !is.na(very.matches)
         if (score >= 0) 
             score <- score + sum(very_matches)
         else score <- score - sum(very_matches)
         negation.matches <- match(words, negation)
         negation_matches <- !is.na(negation.matches)
         print(paste("Processing sentence:", sentence, sep = " "))
         if (sum(negation_matches) > 0) 
             score <- POStag(sentence, words)
         return(score)
     }, negative_words, positive_words)
  ...
  13: lapply(pieces, .fun, ...)
  14: FUN(X[[i]], ...)
  15: stringr::str_trim
  16: getExportedValue(pkg, name)
  17: asNamespace(ns)
  18: getNamespace(ns)
  19: tryCatch(loadNamespace(name), error = function(e) stop(e))
  20: tryCatchList(expr, classes, parentenv, handlers)
  21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  22: value[[3L]](cond)
  
  -- 4. Error: calculate_custom_score is score of sentences (@testing.R#45)  -----
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: expect_equal(expect_list_equal(calculate_custom_score(c("This is very good", "This is bad"), 
         c("good"), c("bad"), 1), c(2, -1)), 0) at testthat/testing.R:45
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: expect_list_equal(calculate_custom_score(c("This is very good", "This is bad"), c("good"), 
         c("bad"), 1), c(2, -1))
  5: setdiff(t, s) at testthat/testing.R:6
  6: as.vector(x)
  7: calculate_custom_score(c("This is very good", "This is bad"), c("good"), c("bad"), 
         1)
  8: getpolarity(text, negativewords, positivewords)
  9: plyr::laply(sentences, function(sentence, negativewords, positivewords) {
         if (is.na(sentence)) 
             return(NA)
         if (regexpr("[?]", sentence) > 0) 
             return(99)
         if (grepl(":-(", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "bad", sep = " ")
         else if (grepl(":-)", sentence, fixed = TRUE) || grepl(":)", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "good", sep = " ")
         else if (grepl(":-D", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "very good", sep = " ")
         else if (grepl(":-|", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "indifferent", sep = " ")
         else if (grepl(":-X", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "very bad", sep = " ")
         else sentence <- paste(sentence, "", sep = "")
         sentence <- iconv(sentence, "WINDOWS-1252", "UTF-8")
         trim <- function(x) gsub("^\\s+|\\s+$", "", x)
         sentence <- gsub("n't", " not", sentence)
         sentence <- trim(sentence)
         sentence <- gsub("[[:punct:]]", "", iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- gsub("[[:cntrl:]]", "", iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- stringr::str_trim(iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- tolower(sentence)
         wordList <- stringr::str_split(sentence, "\\s+")
         words <- unlist(wordList)
         positive.matches <- match(words, positivewords)
         negative.matches <- match(words, negativewords)
         positive_matches <- !is.na(positive.matches)
         negative_matches <- !is.na(negative.matches)
         score <- sum(positive_matches) - sum(negative_matches)
         very.matches <- match(words, c("very", "most", "more"))
         very_matches <- !is.na(very.matches)
         if (score >= 0) 
             score <- score + sum(very_matches)
         else score <- score - sum(very_matches)
         negation.matches <- match(words, negation)
         negation_matches <- !is.na(negation.matches)
         print(paste("Processing sentence:", sentence, sep = " "))
         if (sum(negation_matches) > 0) 
             score <- POStag(sentence, words)
         return(score)
     }, negativewords, positivewords)
  10: llply(.data = .data, .fun = .fun, ..., .progress = .progress, .inform = .inform, 
         .parallel = .parallel, .paropts = .paropts)
  11: structure(lapply(pieces, .fun, ...), dim = dim(pieces))
  12: lapply(pieces, .fun, ...)
  13: FUN(X[[i]], ...)
  14: stringr::str_trim
  15: getExportedValue(pkg, name)
  16: asNamespace(ns)
  17: getNamespace(ns)
  18: tryCatch(loadNamespace(name), error = function(e) stop(e))
  19: tryCatchList(expr, classes, parentenv, handlers)
  20: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  21: value[[3L]](cond)
  
  -- 5. Error: calculate_custom_total_prsence_sentiment is sentiment of sentences 
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: expect_equal(expect_list_equal(calculate_custom_total_presence_sentiment(c("This is very good", 
         "This is bad"), c("good"), c("bad"), 1), score_array), 0) at testthat/testing.R:64
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: expect_list_equal(calculate_custom_total_presence_sentiment(c("This is very good", 
         "This is bad"), c("good"), c("bad"), 1), score_array)
  5: setdiff(t, s) at testthat/testing.R:6
  6: as.vector(x)
  7: calculate_custom_total_presence_sentiment(c("This is very good", "This is bad"), 
         c("good"), c("bad"), 1)
  8: calculate_custom_score(text, positivewords, negativewords, check)
  9: getpolarity(text, negativewords, positivewords)
  10: plyr::laply(sentences, function(sentence, negativewords, positivewords) {
         if (is.na(sentence)) 
             return(NA)
         if (regexpr("[?]", sentence) > 0) 
             return(99)
         if (grepl(":-(", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "bad", sep = " ")
         else if (grepl(":-)", sentence, fixed = TRUE) || grepl(":)", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "good", sep = " ")
         else if (grepl(":-D", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "very good", sep = " ")
         else if (grepl(":-|", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "indifferent", sep = " ")
         else if (grepl(":-X", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "very bad", sep = " ")
         else sentence <- paste(sentence, "", sep = "")
         sentence <- iconv(sentence, "WINDOWS-1252", "UTF-8")
         trim <- function(x) gsub("^\\s+|\\s+$", "", x)
         sentence <- gsub("n't", " not", sentence)
         sentence <- trim(sentence)
         sentence <- gsub("[[:punct:]]", "", iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- gsub("[[:cntrl:]]", "", iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- stringr::str_trim(iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- tolower(sentence)
         wordList <- stringr::str_split(sentence, "\\s+")
         words <- unlist(wordList)
         positive.matches <- match(words, positivewords)
         negative.matches <- match(words, negativewords)
         positive_matches <- !is.na(positive.matches)
         negative_matches <- !is.na(negative.matches)
         score <- sum(positive_matches) - sum(negative_matches)
         very.matches <- match(words, c("very", "most", "more"))
         very_matches <- !is.na(very.matches)
         if (score >= 0) 
             score <- score + sum(very_matches)
         else score <- score - sum(very_matches)
         negation.matches <- match(words, negation)
         negation_matches <- !is.na(negation.matches)
         print(paste("Processing sentence:", sentence, sep = " "))
         if (sum(negation_matches) > 0) 
             score <- POStag(sentence, words)
         return(score)
     }, negativewords, positivewords)
  ...
  13: lapply(pieces, .fun, ...)
  14: FUN(X[[i]], ...)
  15: stringr::str_trim
  16: getExportedValue(pkg, name)
  17: asNamespace(ns)
  18: getNamespace(ns)
  19: tryCatch(loadNamespace(name), error = function(e) stop(e))
  20: tryCatchList(expr, classes, parentenv, handlers)
  21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  22: value[[3L]](cond)
  
  -- 6. Error: calculate_custom_sentiment is sentiment of sentences (@testing.R#70
  undefined exports: %s!=%, %s!==%, %s+%, %s<%, %s<=%, %s==%, %s===%, %s>%, %s>=%, %stri!=%, %stri!==%, %stri+%, %stri<%, %stri<=%, %stri==%, %stri===%, %stri>%, %stri>=%, stri_datetime_add<-, stri_sub<-, stri_subset<-, stri_subset_charclass<-, stri_subset_coll<-, stri_subset_fixed<-, stri_subset_regex<-, stri_c, stri_c_list, stri_cmp, stri_cmp_eq, stri_cmp_equiv, stri_cmp_ge, stri_cmp_gt, stri_cmp_le, stri_cmp_lt, stri_cmp_neq, stri_cmp_nequiv, stri_compare, stri_conv, stri_count, stri_count_boundaries, stri_count_charclass, stri_count_coll, stri_count_fixed, stri_count_regex, stri_count_words, stri_datetime_add, stri_datetime_create, stri_datetime_fields, stri_datetime_format, stri_datetime_fstr, stri_datetime_now, stri_datetime_parse, stri_datetime_symbols, stri_detect, stri_detect_charclass, stri_detect_coll, stri_detect_fixed, stri_detect_regex, stri_dup, stri_duplicated, stri_duplicated_any, stri_enc_detect, stri_enc_detect2, stri_enc_fromutf32, stri_enc_get, stri_enc_info, stri_enc_isascii, stri_enc_isutf16be, stri_enc_isutf16le, stri_enc_isutf32be, stri_enc_isutf32le, stri_enc_isutf8, stri_enc_list, stri_enc_mark, stri_enc_set, stri_enc_toascii, stri_enc_tonative, stri_enc_toutf32, stri_enc_toutf8, stri_encode, stri_endswith, stri_endswith_charclass, stri_endswith_coll, stri_endswith_fixed, stri_escape_unicode, stri_extract, stri_extract_all, stri_extract_all_boundaries, stri_extract_all_charclass, stri_extract_all_coll, stri_extract_all_fixed, stri_extract_all_regex, stri_extract_all_words, stri_extract_first, stri_extract_first_boundaries, stri_extract_first_charclass, stri_extract_first_coll, stri_extract_first_fixed, stri_extract_first_regex, stri_extract_first_words, stri_extract_last, stri_extract_last_boundaries, stri_extract_last_charclass, stri_extract_last_coll, stri_extract_last_fixed, stri_extract_last_regex, stri_extract_last_words, stri_flatten, stri_info, stri_isempty, stri_join, stri_join_list, stri_length, stri_list2matrix, stri_locale_get, stri_locale_info, stri_locale_list, stri_locale_set, stri_locate, stri_locate_all, stri_locate_all_boundaries, stri_locate_all_charclass, stri_locate_all_coll, stri_locate_all_fixed, stri_locate_all_regex, stri_locate_all_words, stri_locate_first, stri_locate_first_boundaries, stri_locate_first_charclass, stri_locate_first_coll, stri_locate_first_fixed, stri_locate_first_regex, stri_locate_first_words, stri_locate_last, stri_locate_last_boundaries, stri_locate_last_charclass, stri_locate_last_coll, stri_locate_last_fixed, stri_locate_last_regex, stri_locate_last_words, stri_match, stri_match_all, stri_match_all_regex, stri_match_first, stri_match_first_regex, stri_match_last, stri_match_last_regex, stri_na2empty, stri_numbytes, stri_opts_brkiter, stri_opts_collator, stri_opts_fixed, stri_opts_regex, stri_order, stri_pad, stri_pad_both, stri_pad_left, stri_pad_right, stri_paste, stri_paste_list, stri_rand_lipsum, stri_rand_shuffle, stri_rand_strings, stri_read_lines, stri_read_raw, stri_remove_empty, stri_replace, stri_replace_all, stri_replace_all_charclass, stri_replace_all_coll, stri_replace_all_fixed, stri_replace_all_regex, stri_replace_first, stri_replace_first_charclass, stri_replace_first_coll, stri_replace_first_fixed, stri_replace_first_regex, stri_replace_last, stri_replace_last_charclass, stri_replace_last_coll, stri_replace_last_fixed, stri_replace_last_regex, stri_replace_na, stri_reverse, stri_sort, stri_split, stri_split_boundaries, stri_split_charclass, stri_split_coll, stri_split_fixed, stri_split_lines, stri_split_lines1, stri_split_regex, stri_startswith, stri_startswith_charclass, stri_startswith_coll, stri_startswith_fixed, stri_stats_general, stri_stats_latex, stri_sub, stri_subset, stri_subset_charclass, stri_subset_coll, stri_subset_fixed, stri_subset_regex, stri_timezone_get, stri_timezone_info, stri_timezone_list, stri_timezone_set, stri_trans_char, stri_trans_general, stri_trans_isnfc, stri_trans_isnfd, stri_trans_isnfkc, stri_trans_isnfkc_casefold, stri_trans_isnfkd, stri_trans_list, stri_trans_nfc, stri_trans_nfd, stri_trans_nfkc, stri_trans_nfkc_casefold, stri_trans_nfkd, stri_trans_tolower, stri_trans_totitle, stri_trans_toupper, stri_trim, stri_trim_both, stri_trim_left, stri_trim_right, stri_unescape_unicode, stri_unique, stri_width, stri_wrap, stri_write_lines
  1: expect_equal(expect_list_equal(calculate_custom_sentiment(c("This is very good", 
         "This is bad"), c("good"), c("bad"), 1), df), 0) at testthat/testing.R:70
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: expect_list_equal(calculate_custom_sentiment(c("This is very good", "This is bad"), 
         c("good"), c("bad"), 1), df)
  5: setdiff(t, s) at testthat/testing.R:6
  6: as.vector(x)
  7: calculate_custom_sentiment(c("This is very good", "This is bad"), c("good"), c("bad"), 
         1)
  8: calculate_custom_score(text, positivewords, negativewords, check)
  9: getpolarity(text, negativewords, positivewords)
  10: plyr::laply(sentences, function(sentence, negativewords, positivewords) {
         if (is.na(sentence)) 
             return(NA)
         if (regexpr("[?]", sentence) > 0) 
             return(99)
         if (grepl(":-(", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "bad", sep = " ")
         else if (grepl(":-)", sentence, fixed = TRUE) || grepl(":)", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "good", sep = " ")
         else if (grepl(":-D", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "very good", sep = " ")
         else if (grepl(":-|", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "indifferent", sep = " ")
         else if (grepl(":-X", sentence, fixed = TRUE)) 
             sentence <- paste(sentence, "very bad", sep = " ")
         else sentence <- paste(sentence, "", sep = "")
         sentence <- iconv(sentence, "WINDOWS-1252", "UTF-8")
         trim <- function(x) gsub("^\\s+|\\s+$", "", x)
         sentence <- gsub("n't", " not", sentence)
         sentence <- trim(sentence)
         sentence <- gsub("[[:punct:]]", "", iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- gsub("[[:cntrl:]]", "", iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- stringr::str_trim(iconv(sentence, to = "ASCII//TRANSLIT"))
         sentence <- tolower(sentence)
         wordList <- stringr::str_split(sentence, "\\s+")
         words <- unlist(wordList)
         positive.matches <- match(words, positivewords)
         negative.matches <- match(words, negativewords)
         positive_matches <- !is.na(positive.matches)
         negative_matches <- !is.na(negative.matches)
         score <- sum(positive_matches) - sum(negative_matches)
         very.matches <- match(words, c("very", "most", "more"))
         very_matches <- !is.na(very.matches)
         if (score >= 0) 
             score <- score + sum(very_matches)
         else score <- score - sum(very_matches)
         negation.matches <- match(words, negation)
         negation_matches <- !is.na(negation.matches)
         print(paste("Processing sentence:", sentence, sep = " "))
         if (sum(negation_matches) > 0) 
             score <- POStag(sentence, words)
         return(score)
     }, negativewords, positivewords)
  ...
  13: lapply(pieces, .fun, ...)
  14: FUN(X[[i]], ...)
  15: stringr::str_trim
  16: getExportedValue(pkg, name)
  17: asNamespace(ns)
  18: getNamespace(ns)
  19: tryCatch(loadNamespace(name), error = function(e) stop(e))
  20: tryCatchList(expr, classes, parentenv, handlers)
  21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  22: value[[3L]](cond)
  
  == testthat results  ===========================================================
  OK: 0 SKIPPED: 0 FAILED: 6
  1. Error: calculate_score is score of sentences (@testing.R#15) 
  2. Error: calculate_sentiment is sentiment of sentences (@testing.R#21) 
  3. Error: calculate_total_prsence_sentiment is sentiment of sentences (@testing.R#39) 
  4. Error: calculate_custom_score is score of sentences (@testing.R#45) 
  5. Error: calculate_custom_total_prsence_sentiment is sentiment of sentences (@testing.R#64) 
  6. Error: calculate_custom_sentiment is sentiment of sentences (@testing.R#70) 
  
  Error: testthat unit tests failed
  Execution halted