Running ‘CausalImpact_import_test.R’ [3s/4s]
  Running ‘testthat.R’ [22s/32s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # Copyright 2014 Google Inc. All rights reserved.
  > #
  > # Licensed under the Apache License, Version 2.0 (the "License");
  > # you may not use this file except in compliance with the License.
  > # You may obtain a copy of the License at
  > #
  > # http://www.apache.org/licenses/LICENSE-2.0
  > #
  > # Unless required by applicable law or agreed to in writing, software
  > # distributed under the License is distributed on an "AS IS" BASIS,
  > # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  > # See the License for the specific language governing permissions and
  > # limitations under the License.
  > 
  > # Unit test driver for the CausalImpact package.
  > #
  > # Author: kbrodersen@google.com (Kay Brodersen)
  > 
  > library(CausalImpact)
  Loading required package: bsts
  Loading required package: BoomSpikeSlab
  Loading required package: Boom
  Loading required package: MASS
  
  Attaching package: 'Boom'
  
  The following object is masked from 'package:stats':
  
      rWishart
  
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  Loading required package: xts
  > library(testthat)
  > 
  > # Open graphics device and run tests
  > plot.file <- tempfile("CausalImpact", fileext = ".png")
  > png(plot.file)
  > testthat::test_check("CausalImpact")
  ── 1. Failure: CausalImpact.RunWithData.DataFormats (@test-impact-analysis.R#246
  `plot(q)` threw an error.
  Message: VECTOR_ELT() can only be applied to a 'list', not a 'double'
  Class:   simpleError/error/condition
  
  ── 2. Failure: CausalImpact.RunWithData.PreAndPostPeriod (@test-impact-analysis.
  `plot(q)` threw an error.
  Message: VECTOR_ELT() can only be applied to a 'list', not a 'double'
  Class:   simpleError/error/condition
  
  ── 3. Failure: CausalImpact.RunWithData.ShortTimeSeries (@test-impact-analysis.R
  `plot(q)` threw an error.
  Message: VECTOR_ELT() can only be applied to a 'list', not a 'double'
  Class:   simpleError/error/condition
  
  ── 4. Failure: CausalImpact.RunWithBstsModel (@test-impact-analysis.R#589)  ────
  `plot(q)` threw an error.
  Message: VECTOR_ELT() can only be applied to a 'list', not a 'double'
  Class:   simpleError/error/condition
  
  ── 5. Failure: CausalImpact.RunWithBstsModel (@test-impact-analysis.R#618)  ────
  `plot(q)` threw an error.
  Message: VECTOR_ELT() can only be applied to a 'list', not a 'double'
  Class:   simpleError/error/condition
  
  ── 6. Failure: CreateImpactPlot (@test-impact-plot.R#108)  ─────────────────────
  `suppressWarnings(plot(q))` threw an error.
  Message: VECTOR_ELT() can only be applied to a 'list', not a 'double'
  Class:   simpleError/error/condition
  
  ── 7. Failure: CreateImpactPlot (@test-impact-plot.R#119)  ─────────────────────
  `suppressWarnings(plot(q))` threw an error.
  Message: VECTOR_ELT() can only be applied to a 'list', not a 'double'
  Class:   simpleError/error/condition
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 730 SKIPPED: 0 FAILED: 7
  1. Failure: CausalImpact.RunWithData.DataFormats (@test-impact-analysis.R#246) 
  2. Failure: CausalImpact.RunWithData.PreAndPostPeriod (@test-impact-analysis.R#320) 
  3. Failure: CausalImpact.RunWithData.ShortTimeSeries (@test-impact-analysis.R#507) 
  4. Failure: CausalImpact.RunWithBstsModel (@test-impact-analysis.R#589) 
  5. Failure: CausalImpact.RunWithBstsModel (@test-impact-analysis.R#618) 
  6. Failure: CreateImpactPlot (@test-impact-plot.R#108) 
  7. Failure: CreateImpactPlot (@test-impact-plot.R#119) 
  
  Error: testthat unit tests failed
  Execution halted