Running ‘test-sst-example.R’ [5s/14s]
  Running ‘test-standalone.R’
  Running ‘testthat.R’ [12s/30s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(sstModel)
  sstModel 1.0.0 
  
  Copyright (c) 2018 Swiss Financial Market Supervisory Authority FINMA
  
  Swiss Financial Market Supervisory Authority FINMA
  Laupenstrasse 27
  CH-3003 Bern
  
  info@finma.ch
  
  This program comes with ABSOLUTELY NO WARRANTY.
  This is free software, and you are welcome to redistribute it
  under certain conditions. 
  
  Type launchDashboard() and go to the 'Legal Notices' Tab for more details about the license. 
  
  Type sstModel_news() to see new features/changes/fixes.
  
  Type sstModel_check() to scan your package library for potential issues.
  > 
  > test_check("sstModel")
   asset     
   ---------  
   type:      equity 
   currency:  CHF 
   value:     10 
   
   asset forward 
   ------------- 
   type:      equity 
   currency:  EUR 
   time:      1 
   exposure:  10 
   price:     100 
   position:  long 
   
   cashflow 
   --------- 
   time:      1 
   currency:  CHF 
   rating:    AAA 
   spread:    0.2 
   value:     10 
   
   delta term 
   --------------- 
   name:           2YCHF, EURCHF 
   currency:       CHF, CHF 
   sensitivity:    12, 25 
   
   fx forward 
   -------------- 
   domestic:      CHF 
   foreign:       EUR 
   time:          1 
   nominal:       10 
   rate:          1.1 
   position:      long 
   
   health         
   --------------- 
   name:           Sstorno, invalidity 
   currency:       CHF, EUR 
   sensitivity:    12, 25 
   
   healthRisk 
   ------------------- 
   correlation matrix: 2  x  2 
   
   liability 
   ---------- 
   time:      1 
   currency:  CHF 
   value:     -10 
   
   life           
   --------------- 
   name:           Sstorno, invalidity 
   currency:       CHF, CHF 
   sensitivity:    12, 25 
   
   lifeRisk 
   --------------------- 
   correlation matrix:   2  x  2 
   quantiles of length:  2 
   marketRisk 
   ------------------- 
   covariance matrix:         4  x  4 
   mapping table:             4 risk-factors 
   base currency:             CHF 
   
   nonLifeRisk 
   ------------------- 
   a vector of simulations of length:  5 
   
   nonLifeRisk 
   ------------------- 
   simulations from empirical cumulative distribution function. 
   
   nonLifeRisk 
   ------------------- 
   centered log-normal simulations.  
   
   participation 
   ------------------- 
   a participation with total value:  10 
   
   participationRisk 
   ------------------- 
   volatility:  3 
   
   portfolio in  CHF 
   > market positions 
   >>>>>>>>>>>>>>>>> 
   a list with  1  market items  
   >>>>>>>>>>>>>>> 
   > participations 
   >>>>>>>>>>>>>>> 
   NULL 
   >>>>>>>>>>>>>>> 
   > life insurance 
   >>>>>>>>>>>>>>> 
   NULL 
   >>>>>>>>>>>>>>>>> 
   > health insurance 
   >>>>>>>>>>>>>>>>> 
   NULL 
   
  ── 1. Error: conditionalReordering is ok (@test-reordering.R#150)  ─────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: conditionalReordering(n = 1000, list.correlation.matrix = list.correlation.matrix, 
         scenario.probability = scenario.probability, name = c("market", "life", "health", 
             "nonlife"), region.probability = region.probability, region.boundaries = region.boundaries) at testthat/test-reordering.R:150
  2: scenario.indicator[, eval(parse(text = paste("scenario.indicator[, scenario := sample(0:", 
         nrow(region.boundaries), ", size = .N, replace = T, prob = c(", paste("prob_", 
             c("base", names.regions), "[1]", sep = "", collapse = ", "), ")), by = 'ind']", 
         sep = "")))]
  3: `[.data.table`(scenario.indicator, , eval(parse(text = paste("scenario.indicator[, scenario := sample(0:", 
         nrow(region.boundaries), ", size = .N, replace = T, prob = c(", paste("prob_", 
             c("base", names.regions), "[1]", sep = "", collapse = ", "), ")), by = 'ind']", 
         sep = ""))))
  4: eval(jsub, SDenv, parent.frame())
  5: eval(jsub, SDenv, parent.frame())
  6: scenario.indicator[, `:=`(scenario, sample(0:3, size = .N, replace = T, prob = c(prob_base[1], 
         prob_scenario1[1], prob_scenario2[1], prob_scenario3[1]))), by = "ind"]
  7: `[.data.table`(scenario.indicator, , `:=`(scenario, sample(0:3, size = .N, replace = T, 
         prob = c(prob_base[1], prob_scenario1[1], prob_scenario2[1], prob_scenario3[1]))), 
         by = "ind")
  
   scenarioRisk 
   ------------- 
   name:         terrorism 
   probability:  0.1 
   currency:     CHF 
   effect:       -100 
    scenarioRisk 
   ------------- 
   name:         market crash 
   probability:  0.2 
   currency:     CHF 
   effect:       -50 
   
  ── 2. Error: sstOutput figures are ok (@test-sstOutput.R#152)  ─────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: compute(model, nsim = 1000, seed = 0, nested.market.computations = T) at testthat/test-sstOutput.R:152
  2: compute.sstModel(model, nsim = 1000, seed = 0, nested.market.computations = T)
  3: aggregateRisks(risks = standalones, model = object)
  4: conditionalReordering(n = n.sim, list.correlation.matrix = model$reordering.parameters$list.correlation.matrix, 
         name = risk.names, scenario.probability = model$reordering.parameters$scenario.probability, 
         region.boundaries = model$reordering.parameters$region.boundaries, region.probability = model$reordering.parameters$region.probability)
  5: scenario.indicator[, eval(parse(text = paste("scenario.indicator[, scenario := sample(0:", 
         nrow(region.boundaries), ", size = .N, replace = T, prob = c(", paste("prob_", 
             c("base", names.regions), "[1]", sep = "", collapse = ", "), ")), by = 'ind']", 
         sep = "")))]
  6: `[.data.table`(scenario.indicator, , eval(parse(text = paste("scenario.indicator[, scenario := sample(0:", 
         nrow(region.boundaries), ", size = .N, replace = T, prob = c(", paste("prob_", 
             c("base", names.regions), "[1]", sep = "", collapse = ", "), ")), by = 'ind']", 
         sep = ""))))
  7: eval(jsub, SDenv, parent.frame())
  8: eval(jsub, SDenv, parent.frame())
  9: scenario.indicator[, `:=`(scenario, sample(0:3, size = .N, replace = T, prob = c(prob_base[1], 
         prob_scenario1[1], prob_scenario2[1], prob_scenario3[1]))), by = "ind"]
  10: `[.data.table`(scenario.indicator, , `:=`(scenario, sample(0:3, size = .N, replace = T, 
         prob = c(prob_base[1], prob_scenario1[1], prob_scenario2[1], prob_scenario3[1]))), 
         by = "ind")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 1189 SKIPPED: 10 FAILED: 2
  1. Error: conditionalReordering is ok (@test-reordering.R#150) 
  2. Error: sstOutput figures are ok (@test-sstOutput.R#152) 
  
  Error: testthat unit tests failed
  Execution halted