* using log directory 'd:/Rcompile/CRANpkg/local/4.5/dhlabR.Rcheck' * using R Under development (unstable) (2024-07-14 r86899 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.2.0 GNU Fortran (GCC) 13.2.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'dhlabR/DESCRIPTION' ... OK * this is package 'dhlabR' version '1.0.2' * 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 'dhlabR' can be installed ... OK * checking installed package size ... OK * checking package 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 code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [1s] OK * checking whether the package can be loaded with stated dependencies ... [1s] OK * checking whether the package can be unloaded cleanly ... [1s] OK * checking whether the namespace can be loaded with stated dependencies ... [1s] OK * checking whether the namespace can be unloaded cleanly ... [1s] OK * checking loading without being on the library search path ... [1s] 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 ... [4s] OK * checking Rd files ... [1s] 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 examples ... [2s] ERROR Running examples in 'dhlabR-Ex.R' failed The error most likely occurred in: > ### Name: get_collocations > ### Title: Get collocations for word in corpus > ### Aliases: get_collocations > > ### ** Examples > > pids <- c("URN:NBN:no-nb_digibok_2008051404065", "URN:NBN:no-nb_digibok_2010092120011") > word <- "." > collocations <- get_collocations(pids, word) Error: Please install xml2 package Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [4s] ERROR Running 'testthat.R' [4s] Running the tests in 'tests/testthat.R' failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/tests.html > # * https://testthat.r-lib.org/reference/test_package.html#special-files > > library(testthat) > library(dhlabR) > > test_check("dhlabR") [ FAIL 13 | WARN 1 | SKIP 0 | PASS 1 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-get_collocations.R:3:3'): get_collocations returns a data frame ── Error: Please install xml2 package Backtrace: ▆ 1. └─dhlabR::get_document_corpus(doctype = "digibok") at test-get_collocations.R:3:3 2. ├─base::as.data.frame(do.call(cbind, content(query))) 3. ├─base::do.call(cbind, content(query)) 4. └─httr::content(query) 5. └─httr:::parse_auto(raw, type, encoding, ...) 6. └─httr (local) parser(x = content, type = type, encoding = encoding, ...) 7. └─httr:::need_package("xml2") ── Error ('test-get_concordance.R:3:3'): get_concordance returns a valid dataframe ── Error: Please install xml2 package Backtrace: ▆ 1. └─dhlabR::get_document_corpus(doctype = "digibok") at test-get_concordance.R:3:3 2. ├─base::as.data.frame(do.call(cbind, content(query))) 3. ├─base::do.call(cbind, content(query)) 4. └─httr::content(query) 5. └─httr:::parse_auto(raw, type, encoding, ...) 6. └─httr (local) parser(x = content, type = type, encoding = encoding, ...) 7. └─httr:::need_package("xml2") ── Error ('test-get_dispersion.R:14:3'): get_dispersion returns expected result for known input ── Error: Please install xml2 package Backtrace: ▆ 1. └─dhlabR::get_dispersion(urn, words, window, pr) at test-get_dispersion.R:14:3 2. ├─base::as.data.frame(do.call(rbind, content(query))) 3. ├─base::do.call(rbind, content(query)) 4. └─httr::content(query) 5. └─httr:::parse_auto(raw, type, encoding, ...) 6. └─httr (local) parser(x = content, type = type, encoding = encoding, ...) 7. └─httr:::need_package("xml2") ── Error ('test-get_document_corpus.R:3:3'): get_document_corpus returns expected results ── Error: Please install xml2 package Backtrace: ▆ 1. └─dhlabR::get_document_corpus() at test-get_document_corpus.R:3:3 2. ├─base::as.data.frame(do.call(cbind, content(query))) 3. ├─base::do.call(cbind, content(query)) 4. └─httr::content(query) 5. └─httr:::parse_auto(raw, type, encoding, ...) 6. └─httr (local) parser(x = content, type = type, encoding = encoding, ...) 7. └─httr:::need_package("xml2") ── Error ('test-get_document_frequencies.R:3:3'): get_document_frequencies returns a valid dataframe ── Error: Please install xml2 package Backtrace: ▆ 1. └─dhlabR::get_document_corpus(doctype = "digibok") at test-get_document_frequencies.R:3:3 2. ├─base::as.data.frame(do.call(cbind, content(query))) 3. ├─base::do.call(cbind, content(query)) 4. └─httr::content(query) 5. └─httr:::parse_auto(raw, type, encoding, ...) 6. └─httr (local) parser(x = content, type = type, encoding = encoding, ...) 7. └─httr:::need_package("xml2") ── Error ('test-get_metadata.R:7:3'): get_metadata returns a dataframe with expected columns ── Error: Please install xml2 package Backtrace: ▆ 1. └─dhlabR::get_metadata(dhlabids = test_dhlabids) at test-get_metadata.R:7:3 2. ├─base::do.call(cbind, content(query)) 3. └─httr::content(query) 4. └─httr:::parse_auto(raw, type, encoding, ...) 5. └─httr (local) parser(x = content, type = type, encoding = encoding, ...) 6. └─httr:::need_package("xml2") ── Error ('test-get_ngram_from_book.R:2:3'): function returns a data frame ───── Error: Please install xml2 package Backtrace: ▆ 1. └─dhlabR::get_ngram_from_books() at test-get_ngram_from_book.R:2:3 2. ├─utils::stack(content(query)) 3. └─httr::content(query) 4. └─httr:::parse_auto(raw, type, encoding, ...) 5. └─httr (local) parser(x = content, type = type, encoding = encoding, ...) 6. └─httr:::need_package("xml2") ── Error ('test-get_ngram_from_book.R:7:3'): function returns a data frame with the correct columns ── Error: Please install xml2 package Backtrace: ▆ 1. └─dhlabR::get_ngram_from_books() at test-get_ngram_from_book.R:7:3 2. ├─utils::stack(content(query)) 3. └─httr::content(query) 4. └─httr:::parse_auto(raw, type, encoding, ...) 5. └─httr (local) parser(x = content, type = type, encoding = encoding, ...) 6. └─httr:::need_package("xml2") ── Error ('test-get_ngram_from_newspapers.R:2:3'): function returns a data frame ── Error: Please install xml2 package Backtrace: ▆ 1. └─dhlabR::get_ngram_from_newspapers() at test-get_ngram_from_newspapers.R:2:3 2. ├─utils::stack(content(query)) 3. └─httr::content(query) 4. └─httr:::parse_auto(raw, type, encoding, ...) 5. └─httr (local) parser(x = content, type = type, encoding = encoding, ...) 6. └─httr:::need_package("xml2") ── Error ('test-get_ngram_from_newspapers.R:7:3'): function returns a data frame with the correct columns ── Error: Please install xml2 package Backtrace: ▆ 1. └─dhlabR::get_ngram_from_newspapers() at test-get_ngram_from_newspapers.R:7:3 2. ├─utils::stack(content(query)) 3. └─httr::content(query) 4. └─httr:::parse_auto(raw, type, encoding, ...) 5. └─httr (local) parser(x = content, type = type, encoding = encoding, ...) 6. └─httr:::need_package("xml2") ── Error ('test-get_reference_words.R:9:3'): get_reference_words returns a valid list ── Error: Please install xml2 package Backtrace: ▆ 1. └─dhlabR::get_reference_words(doctype, from_year, to_year, words) at test-get_reference_words.R:9:3 2. └─httr::content(query) 3. └─httr:::parse_auto(raw, type, encoding, ...) 4. └─httr (local) parser(x = content, type = type, encoding = encoding, ...) 5. └─httr:::need_package("xml2") ── Error ('test-get_urn_frequencies.R:7:3'): get_urn_frequencies works with a list of dhlabids ── Error: Please install xml2 package Backtrace: ▆ 1. └─dhlabR::get_urn_frequencies(dhlabids = urn_list) at test-get_urn_frequencies.R:7:3 2. ├─base::as.data.frame(do.call(rbind, content(query))) 3. ├─base::do.call(rbind, content(query)) 4. └─httr::content(query) 5. └─httr:::parse_auto(raw, type, encoding, ...) 6. └─httr (local) parser(x = content, type = type, encoding = encoding, ...) 7. └─httr:::need_package("xml2") ── Error ('test-get_urn_frequencies.R:19:3'): get_urn_frequencies works with a data frame of URNs ── Error: Please install xml2 package Backtrace: ▆ 1. └─dhlabR::get_document_corpus(doctype = "digibok") at test-get_urn_frequencies.R:19:3 2. ├─base::as.data.frame(do.call(cbind, content(query))) 3. ├─base::do.call(cbind, content(query)) 4. └─httr::content(query) 5. └─httr:::parse_auto(raw, type, encoding, ...) 6. └─httr (local) parser(x = content, type = type, encoding = encoding, ...) 7. └─httr:::need_package("xml2") [ FAIL 13 | WARN 1 | SKIP 0 | PASS 1 ] Error: Test failures Execution halted * checking PDF version of manual ... [21s] OK * checking HTML version of manual ... [2s] OK * DONE Status: 2 ERRORs