* using log directory ‘/data/gannet/ripley/R/packages/tests-noLD/ElectionsLATAM.Rcheck’ * using R Under development (unstable) (2022-04-19 r82220) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘ElectionsLATAM/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘ElectionsLATAM’ version ‘0.1.1’ * 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 executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘ElectionsLATAM’ can be installed ... [14s/32s] 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 ... [12s/28s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... 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 installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... [29s/68s] OK * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [31s/82s] [32s/83s] ERROR Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(ElectionsLATAM) > library(lgr) > library(dplyr) Attaching package: 'dplyr' The following object is masked from 'package:testthat': matches The following objects are masked from 'package:stats': filter, lag The following objects are masked from 'package:base': intersect, setdiff, setequal, union > library(readr) Attaching package: 'readr' The following objects are masked from 'package:testthat': edition_get, local_edition > > log.levels <- lgr::get_log_levels() > > lgr$set_threshold(log.levels["debug"]) > lgr::threshold("debug", lgr::get_logger("EcologicalInferenceStrategyCalvoEtAl")) > > > > test_check("ElectionsLATAM") INFO [21:05:17.727] Loading input election {input.filepath: `/data/gannet/ripley/R/packages/tests-noLD/ElectionsLATAM.Rcheck/ElectionsLATAM/extdata/costa-rica/2021-generales_pivot_candidatos_n4.csv`} INFO [21:05:19.100] Setting seed {seed: `143324`} INFO [21:05:19.757] Starting with {input.locations: `6661`, output.locations: `6738`, locations.available: `6661`} INFO [21:05:21.322] After filtering locations {input.locations: `6661`, output.locations: `6661`} INFO [21:05:21.566] After filtering comparable locations {threshold: `0.2`, non.comparable.locations: `252`, non.comparable.votes: `43224`, comparable.locations: `6409`, comparable.votes: `2040019`, input.locations: `6409`, output.locations: `6409`} DEBUG [21:05:21.937] newdata = dsINpre+dsOUTpre {nrow.dsINpre: `6409`, nrow.dsOUTpre: `6409`} INFO [21:05:21.947] ParamsEstim {nR: `10`, nC: `5`} INFO [21:05:48.105] calcFractions INFO [21:05:48.146] Results for {description: `input.original`, results: `FA= 3.24|Otros= 2.81|PLN= 10.15|PLP= 4.6|PNR= 5.56|PSD= 6.25|PUSC= 4.62|habilitados= 62.25|blanco_y_nulo= 0.52`, total.votes: `2083243`} INFO [21:05:48.247] Results for {description: `input`, results: `FA= 8.62|Otros= 7.36|PLN= 26.92|PLP= 12.32|PNR= 14.33|PSD= 16.67|PUSC= 12.08|blanco_y_nulo= 1.33|ausente= 0.36`, total.votes: `2040019`} INFO [21:05:48.263] Results for {description: `output.original`, results: `PLN= 16.63|PSD= 18.64|habilitados= 63.79|blanco_y_nulo= 0.93`, total.votes: `1978230`} INFO [21:05:48.287] Results for {description: `output`, results: `PLN= 43.56|PSD= 48.72|blanco_y_nulo= 2.43|ausente= 5.3`, total.votes: `1939026`} INFO [21:05:48.300] Votes {total.input.votes: `2083243`, total.input.applied.votes: `2040019`, total.output.votes: `1978230`, total.output.applied.votes: `1939026`, change.input.output.votes: `0.9496`, change.input.output.applied.votes: `0.9505`, dismissed.input.votes: `0.9793`, dismissed.output.votes: `0.9802`} INFO [21:05:48.391] Ecological inference Betab file writen {betab.filepath: `/tmp/Rtmp2ZWRfC/working_dir/RtmpiOeCUC/test/costa-rica/2022-costa-rica-general-ballotage-n4-ein-betab-scen-final-s-143324.csv`} INFO [21:05:48.579] Ecological inference json writen {json.filepath: `/tmp/Rtmp2ZWRfC/working_dir/RtmpiOeCUC/test/costa-rica/balotaje_n4_ei.json`} INFO [21:05:48.652] Generating sankeyNetwork {nodes: `13`, links: `36`} WARN [21:05:49.202] expectCompatible- diff in Output Matrix {i: `4`, j: `3`, row: `PLP`, col: `blanco_y_nulo`, observed: `7433`, expected: `4179`, diff.rel: `0.7787`} WARN [21:05:50.578] expectCompatible- diff in Output Matrix {i: `8`, j: `4`, row: `blanco_y_nulo`, col: `ausente`, observed: `1407`, expected: `819`, diff.rel: `0.7179`} INFO [21:05:51.027] Loading input election {input.filepath: `/data/gannet/ripley/R/packages/tests-noLD/ElectionsLATAM.Rcheck/ElectionsLATAM/extdata/costa-rica/2021-generales_pivot_candidatos_n4.csv`} INFO [21:05:51.549] Setting seed {seed: `143324`} INFO [21:05:51.815] Starting with {input.locations: `6661`, output.locations: `6738`, locations.available: `6661`} INFO [21:05:52.878] After filtering locations {input.locations: `6661`, output.locations: `6661`} INFO [21:05:53.104] After filtering comparable locations {threshold: `0.3`, non.comparable.locations: `0`, non.comparable.votes: `0`, comparable.locations: `6661`, comparable.votes: `3435539`, input.locations: `6661`, output.locations: `6661`} DEBUG [21:05:53.870] newdata = dsINpre+dsOUTpre {nrow.dsINpre: `6661`, nrow.dsOUTpre: `6661`} INFO [21:05:53.891] ParamsEstim {nR: `10`, nC: `5`} INFO [21:06:28.726] calcFractions INFO [21:06:29.013] Results for {description: `input.original`, results: `FA= 8.58|Otros= 7.44|PLN= 26.9|PLP= 12.18|PNR= 14.72|PSD= 16.56|PUSC= 12.24|blanco_y_nulo= 1.38`, total.votes: `2083243`} INFO [21:06:29.038] Results for {description: `input`, results: `FA= 5.2|Otros= 4.51|PLN= 16.31|PLP= 7.39|PNR= 8.92|PSD= 10.04|PUSC= 7.42|blanco_y_nulo= 0.84|ausente= 39.36`, total.votes: `2083243`} INFO [21:06:29.062] Results for {description: `output.original`, results: `PLN= 45.94|PSD= 51.48|blanco_y_nulo= 2.58`, total.votes: `1978230`} INFO [21:06:29.069] Results for {description: `output`, results: `PLN= 26.36|PSD= 29.58|blanco_y_nulo= 1.48|ausente= 42.58`, total.votes: `1972818`} INFO [21:06:29.097] Votes {total.input.votes: `2083243`, total.input.applied.votes: `2083243`, total.output.votes: `1978230`, total.output.applied.votes: `1972818`, change.input.output.votes: `0.9496`, change.input.output.applied.votes: `0.947`, dismissed.input.votes: `1`, dismissed.output.votes: `0.9973`} [ FAIL 2 | WARN 2 | SKIP 0 | PASS 52 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure (test_costa_rica.R:45:3): Costa Rica ecological Inference ─────────── `test.passes` is not TRUE `actual`: FALSE `expected`: TRUE Backtrace: ▆ 1. └─costa.rica.ein$expectCompatible(output.table.expected, tolerance.rel = 0.32) at test_costa_rica.R:45:2 2. └─testthat::expect_true(test.passes) ── Failure (test_costa_rica.R:45:3): Costa Rica ecological Inference ─────────── `test.passes` is not TRUE `actual`: FALSE `expected`: TRUE Backtrace: ▆ 1. └─costa.rica.ein$expectCompatible(output.table.expected, tolerance.rel = 0.32) at test_costa_rica.R:45:2 2. └─testthat::expect_true(test.passes) [ FAIL 2 | WARN 2 | SKIP 0 | PASS 52 ] Error: Test failures Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking re-building of vignette outputs ... [19s/44s] OK * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR See ‘/data/gannet/ripley/R/packages/tests-noLD/ElectionsLATAM.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 6:44.87, 146.41 + 18.32