* using log directory 'd:/Rcompile/CRANpkg/local/3.3/readtext.Rcheck' * using R version 3.3.3 (2017-03-06) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'readtext/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'readtext' version '0.50' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'readtext' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [1s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [12s] ERROR Running 'testthat.R' [11s] Running the tests in 'tests/testthat.R' failed. Complete output: > Sys.setenv("R_TESTS" = "") > > library(testthat) > library(quanteda) Package version: 1.2.0 Parallel computing: 2 of 32 threads used. See https://quanteda.io for tutorials and examples. Attaching package: 'quanteda' The following object is masked from 'package:utils': View > > ### the following two functions are in the GitHub quanteda but not the > ### CRAN version, so they are defined here for the test purposes as well > ### will be removed once quanteda is refreshed on CRAN > ### -- KB 2016-11-19 > texts.readtext <- function(x, groups = NULL, ...) { + if (!is.null(groups)) + stop("groups argument not supported for texts() on a readtext object") + as.character(x) + # result <- x[["text"]] + # names(result) <- row.names(x) + # result + } > docvars.readtext <- function(x, field = NULL) { + if (!is.null(field)) + warning("field argument not used for docvars on a readtext object", noBreaks. = TRUE) + as.data.frame(x[, -which(names(x) %in% c("doc_id", "text")), drop = FALSE]) + } > > docnames.readtext <- function(x) { + x[["doc_id"]] + } > > ndoc.readtext <- function(x) { + nrow(x) + } > > > test_check("readtext") Loading required package: readtext -- 1. Failure: test encoding function on simple text files (@test-encoding.R#7) `enc` not equal to list(probably = "UTF-8", all = "UTF-8"). Component "probably": 1 string mismatch Component "all": 1 string mismatch -- 2. Failure: test encoding function on simple text files (@test-encoding.R#12) `enc` not equal to list(probably = "UTF-8", all = "UTF-8"). Component "probably": 1 string mismatch Component "all": 1 string mismatch readtext object consisting of 1 document and 0 docvars. # data.frame [1 x 2] doc_id text 1 file259f0689d7e66.txt "\"This is UT\"..." -- 3. Failure: test encoding function on simple text files (@test-encoding.R#17) `encoding(rt, verbose = TRUE)` produced unexpected messages. Expected match: Probable encoding: UTF-8 Actual values: * Probable encoding: ISO-8859-2 * == testthat results =========================================================== OK: 127 SKIPPED: 11 FAILED: 3 1. Failure: test encoding function on simple text files (@test-encoding.R#7) 2. Failure: test encoding function on simple text files (@test-encoding.R#12) 3. Failure: test encoding function on simple text files (@test-encoding.R#17) Error: testthat unit tests failed Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking re-building of vignette outputs ... [9s] OK * checking PDF version of manual ... OK * DONE Status: 1 ERROR