* using log directory ‘/data/blackswan/ripley/R/packages/tests-devel/GE.Rcheck’ * using R Under development (unstable) (2022-03-11 r81877) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * checking for file ‘GE/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘GE’ version ‘0.2.6’ * 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 ‘GE’ can be installed ... 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 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 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 ... [13s/13s] 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 examples ... OK * checking examples with --run-donttest ... [10m/10m] ERROR Running examples in ‘GE-Ex.R’ failed The error most likely occurred in: > ### Name: gemstStructuralMultipleEquilibria_2_2 > ### Title: Structural Multiple Equilibria and Structural Transition Policy > ### Aliases: gemstStructuralMultipleEquilibria_2_2 > > ### ** Examples > > ## No test: > dst.firm <- node_new("output", + type = "CD", alpha = 1, + beta = c(0.35, 0.65), + "prod", "lab" + ) > > dst.consumer <- node_new("utility", + type = "CD", alpha = 1, + beta = c(0.4, 0.6), + "prod", "lab" + ) > > policy.technology <- function(time, state, A) { + # state$last.z[1] is the previous output. + A[[1]]$alpha <- structural_function(state$last.z[1], c(0.3, 0.4), 1, 2) + } > > policy.tax <- function(time, state) { + if ((time >= 15) && state$last.z < 0.4) { + state$S[2, 2] <- 0.8 + state$S[2, 1] <- 0.2 + } else { + state$S[2, 2] <- 1 + state$S[2, 1] <- 0 + } + + state + } > > f <- function(z0 = c(0.1, 1), + policy = list( + policy.technology, + policyMarketClearingPrice + )) { + ge <- sdm2( + A = list(dst.firm, dst.consumer), + B = matrix(c( + 1, 0, + 0, 1 + ), 2, 2, TRUE), + S0Exg = matrix(c( + NA, NA, + NA, 1 + ), 2, 2, TRUE), + names.commodity = c("prod", "lab"), + names.agent = c("firm", "consumer"), + numeraire = "lab", + z0 = z0, + p0 = c(1, 1), + maxIteration = 1, + numberOfPeriods = 30, + policy = policy, + ts = TRUE + ) + + matplot(ge$ts.z, type = "b", pch = 20) + ge + } > > geLow <- f() tolCond: 1e-05 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 1.11022302462516e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 0 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 0 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 1.11022302462516e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 1.11022302462516e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 1.11022302462516e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 0 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 1.11022302462516e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 Iteration number 1 : tolerance coefficient 2.88657986402541e-15 > geLow$z firm consumer 0.2272784 0.3425148 > > geHigh <- f(z0 = c(0.5, 1)) tolCond: 1e-05 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 0 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 0 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 0 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 0 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 0 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 Iteration number 1 : tolerance coefficient 1.4432899320127e-15 > geHigh$z firm consumer 0.6602087 0.5247212 > > f(policy = list( + policy.technology, + policy.tax, + policyMarketClearingPrice + )) tolCond: 1e-05 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 1.11022302462516e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 0 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 3.33066907387547e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 tolCond: 1e-05 Iteration number 1 : tolerance coefficient 2.22044604925031e-16 ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- GE --- call from context --- (function (time, state) { if ((time >= 15) && state$last.z < 0.4) { state$S[2, 2] <- 0.8 state$S[2, 1] <- 0.2 } else { state$S[2, 2] <- 1 state$S[2, 1] <- 0 } state })(time = 15, state = list(p = c(prod = 0.730285728868197, lab = 0.269714271131803 ), S = c(0.22727832573318, 0, 0, 1), last.z = c(0.22727832573318, 0.342514681548387), B = c(1, 0, 0, 1), last.A = c(0.349999779091758, 1.75995664659019, 0.431312368322257, 1.75174972730399), names.commodity = c("prod", "lab"), names.agent = c("firm", "consumer"))) --- call from argument --- (time >= 15) && state$last.z < 0.4 --- R stacktrace --- where 1: (function (time, state) { if ((time >= 15) && state$last.z < 0.4) { state$S[2, 2] <- 0.8 state$S[2, 1] <- 0.2 } else { state$S[2, 2] <- 1 state$S[2, 1] <- 0 } state })(time = 15, state = list(p = c(prod = 0.730285728868197, lab = 0.269714271131803 ), S = c(0.22727832573318, 0, 0, 1), last.z = c(0.22727832573318, 0.342514681548387), B = c(1, 0, 0, 1), last.A = c(0.349999779091758, 1.75995664659019, 0.431312368322257, 1.75174972730399), names.commodity = c("prod", "lab"), names.agent = c("firm", "consumer"))) where 2: do.call(kth.policy, kth.policy.arg) where 3: xNext(xtp1) where 4: sdm2(A = list(dst.firm, dst.consumer), B = matrix(c(1, 0, 0, 1), 2, 2, TRUE), S0Exg = matrix(c(NA, NA, NA, 1), 2, 2, TRUE), names.commodity = c("prod", "lab"), names.agent = c("firm", "consumer"), numeraire = "lab", z0 = z0, p0 = c(1, 1), maxIteration = 1, numberOfPeriods = 30, policy = policy, ts = TRUE) where 5: f(policy = list(policy.technology, policy.tax, policyMarketClearingPrice)) --- value of length: 2 type: logical --- [1] TRUE TRUE --- function from context --- function (time, state) { if ((time >= 15) && state$last.z < 0.4) { state$S[2, 2] <- 0.8 state$S[2, 1] <- 0.2 } else { state$S[2, 2] <- 1 state$S[2, 1] <- 0 } state } --- function search by body --- ----------- END OF FAILURE REPORT -------------- Fatal error: length > 1 in coercion to logical * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * checking for new files in some other directories ... OK * DONE Status: 1 ERROR See ‘/data/blackswan/ripley/R/packages/tests-devel/GE.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 11:21.17, 666.67 + 8.97