* using log directory 'd:/Rcompile/CRANpkg/local/3.6/readsdr.Rcheck' * using R version 3.6.3 (2020-02-29) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'readsdr/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'readsdr' version '0.2.0' * 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 'readsdr' 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 ... [7s] 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 installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [4s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [7s] ERROR Running 'testthat.R' [6s] Running the tests in 'tests/testthat.R' failed. Complete output: > library(testthat) > library(readsdr) > > test_check("readsdr") == Failed tests ================================================================ -- Failure (test-read_xmile.R:99:3): read_xmile() works for a model that has a NOT statement from Stella -- `actual_val` not equal to `expected_val`. 1/1 mismatches [1] 1.25 - 125 == -124 -- Failure (test-stan_utils.R:20:3): extract_timeseries_var() returns the expected data frame -- extract_timeseries_var("var", test_df) not equal to `expected_df`. Component "variable": Modes: character, numeric Component "variable": Attributes: < target is NULL, current is list > Component "variable": target is character, current is factor -- Failure (test-stan_utils.R:36:3): extract_timeseries_stock() returns the expected data frame -- extract_timeseries_stock("S2", test_df, test_stocks, "yhat") not equal to `expected_df`. Component "stock": Modes: character, numeric Component "stock": Attributes: < target is NULL, current is list > Component "stock": target is character, current is factor -- Failure (test-summaries.R:24:3): sd_stocks() returns the expected data frame -- sd_stocks(mdl) not equal to data.frame(...). Component "name": Attributes: < Component "levels": 2 string mismatches > -- Failure (test-xml_model_components.R:91:3): create_level_obj_xmile() returns the expected object -- `actual_val` not equal to `expected_val`. Component "name": 'current' is not a factor Component "equation": 'current' is not a factor Component "initValue": Mean relative difference: 99 -- Failure (test-xml_model_components.R:118:3): create_level_obj_xmile() deals with levels with no flows -- `actual_obj` not equal to `expected_obj`. Component "name": 'current' is not a factor Component "equation": 'current' is not a factor Component "initValue": Mean relative difference: 99 -- Failure (test-xml_model_components.R:159:3): create_level_obj_xmile() works should levels depend on other levels in init values -- `actual_obj` not equal to `expected_obj`. Component 1: Component 1: 'current' is not a factor Component 1: Component 2: 'current' is not a factor Component 1: Component 3: Mean relative difference: 24 Component 2: Component 1: 'current' is not a factor Component 2: Component 2: 'current' is not a factor Component 2: Component 3: Mean relative difference: 99 Component 3: Component 1: 'current' is not a factor Component 3: Component 2: 'current' is not a factor Component 3: Component 3: Mean relative difference: 49 -- Failure (test-xml_model_components.R:195:3): create_level_obj_xmile() returns the expected object in the presence of multiple outflows -- `actual_val` not equal to `expected_val`. Component "name": 'current' is not a factor Component "equation": 'current' is not a factor Component "initValue": Mean relative difference: 99 -- Failure (test-xml_model_components.R:231:3): create_level_obj_xmile() returns the expected object in the presence of multiple inflows -- `actual_val` not equal to `expected_val`. Component "name": 'current' is not a factor Component "equation": 'current' is not a factor Component "initValue": Mean relative difference: 99 -- Failure (test-xml_model_components.R:332:3): create_level_obj_xmile() handles stock vectors -- `actual_obj` not equal to `expected_obj`. Component 1: Component 1: 'current' is not a factor Component 1: Component 2: 'current' is not a factor Component 1: Component 3: Mean relative difference: 99 Component 2: Component 1: 'current' is not a factor Component 2: Component 2: 'current' is not a factor Component 2: Component 3: Mean relative difference: 99 -- Failure (test-xml_model_components.R:342:3): extract_stock_info() handles a stock vector -- `actual_obj` not equal to `expected_obj`. Component 1: Component 1: 'current' is not a factor Component 1: Component 2: 'current' is not a factor Component 1: Component 3: 'current' is not a factor Component 2: Component 1: 'current' is not a factor Component 2: Component 2: 'current' is not a factor Component 2: Component 3: 'current' is not a factor -- Failure (test-xml_model_components.R:374:3): extract_stock_info() handles vector stock with a unique initialisation -- `actual_obj` not equal to `expected_obj`. Component 1: Component 1: 'current' is not a factor Component 1: Component 2: 'current' is not a factor Component 1: Component 3: 'current' is not a factor Component 2: Component 1: 'current' is not a factor Component 2: Component 2: 'current' is not a factor Component 2: Component 3: 'current' is not a factor Component 3: Component 1: 'current' is not a factor Component 3: Component 2: 'current' is not a factor Component 3: Component 3: 'current' is not a factor ... [ FAIL 12 | WARN 3 | SKIP 0 | PASS 241 ] 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 ... [4s] OK * checking PDF version of manual ... OK * DONE Status: 1 ERROR