Running 'CausalImpact_import_test.R' [3s]
  Running 'testthat.R' [21s]
Running the tests in 'tests/CausalImpact_import_test.R' failed.
Complete output:
  > # Copyright 2014-2017 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 for CausalImpact imports.
  > #
  > # Checks whether `CausalImpact()` can be called without attaching the
  > # CausalImpact package. The aim of this test is to check whether CausalImpact
  > # correctly imports all functions needed.
  > #
  > # We therefore intentionally do not call `library(CausalImpact)` in this test.
  > #
  > # Author: alhauser@google.com (Alain Hauser)
  > 
  > 
  > library(testthat)
  > 
  > # Create a data set with one explanatory variable.
  > set.seed(1)
  > x1 <- 100 + arima.sim(model = list(ar = 0.999), n = 100)
  > y <- 1.2 * x1 + rnorm(100)
  > y[71:100] <- y[71:100] + 10
  > data <- cbind(y, x1)
  > 
  > # Test that a `CausalImpact` object is created when the package is not loaded.
  > impact <- CausalImpact::CausalImpact(data, c(1, 70), c(71, 100))
  Error in library.dynam(lib, package, package.lib) : 
    DLL 'dplyr' not found: maybe not installed for this architecture?
  Calls: <Anonymous> ... asNamespace -> getNamespace -> loadNamespace -> library.dynam
  Execution halted
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
  
  
  Attaching package: 'BoomSpikeSlab'
  
  The following object is masked from 'package:stats':
  
      knots
  
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  Loading required package: xts
  
  Attaching package: 'bsts'
  
  The following object is masked from 'package:BoomSpikeSlab':
  
      SuggestBurn
  
  > library(testthat)
  > 
  > # Open graphics device and run tests
  > plot.file <- tempfile("CausalImpact", fileext = ".png")
  > png(plot.file)
  > testthat::test_check("CausalImpact")
  -- 1. Error: CausalImpact.RunWithData.DataFormats (@test-impact-analysis.R#240) 
  DLL 'dplyr' not found: maybe not installed for this architecture?
  Backtrace:
    1. base::suppressWarnings(...)
    3. CausalImpact::CausalImpact(data, pre.period, post.period, model.args)
    4. CausalImpact:::RunWithData(...)
    5. CausalImpact:::CompilePosteriorInferences(...)
    6. CausalImpact:::CompileSummaryTable(...)
    7. dplyr::mutate
    8. base::getExportedValue(pkg, name)
    9. base::asNamespace(ns)
   10. base::getNamespace(ns)
   11. base::loadNamespace(name)
   12. base::library.dynam(lib, package, package.lib)
  
  -- 2. Error: CausalImpact.RunWithData.PreAndPostPeriod (@test-impact-analysis.R#
  DLL 'dplyr' not found: maybe not installed for this architecture?
  Backtrace:
    1. base::suppressWarnings(...)
    3. CausalImpact::CausalImpact(data, pre.period, post.period, model.args)
    4. CausalImpact:::RunWithData(...)
    5. CausalImpact:::CompilePosteriorInferences(...)
    6. CausalImpact:::CompileSummaryTable(...)
    7. dplyr::mutate
    8. base::getExportedValue(pkg, name)
    9. base::asNamespace(ns)
   10. base::getNamespace(ns)
   11. base::loadNamespace(name)
   12. base::library.dynam(lib, package, package.lib)
  
  -- 3. Failure: CausalImpact.RunWithData.MissingValues (@test-impact-analysis.R#4
  `impact <- CausalImpact(data, pre.period, post.period, model.args)` threw an error.
  Message: DLL 'dplyr' not found: maybe not installed for this architecture?
  Class:   simpleError/error/condition
  Backtrace:
    1. testthat::expect_error(...)
    6. CausalImpact::CausalImpact(data, pre.period, post.period, model.args)
    7. CausalImpact:::RunWithData(...)
    8. CausalImpact:::CompilePosteriorInferences(...)
    9. CausalImpact:::CompileSummaryTable(...)
   10. dplyr::mutate
   11. base::getExportedValue(pkg, name)
   12. base::asNamespace(ns)
   13. base::getNamespace(ns)
   14. base::loadNamespace(name)
   15. base::library.dynam(lib, package, package.lib)
  
  -- 4. Error: CausalImpact.RunWithData.MissingValues (@test-impact-analysis.R#417
  object 'impact' not found
  Backtrace:
   1. base::grep("^point\\.pred", names(impact$series))
  
  -- 5. Error: CausalImpact.RunWithData.StandardizeData (@test-impact-analysis.R#4
  DLL 'dplyr' not found: maybe not installed for this architecture?
  Backtrace:
    1. CausalImpact::CausalImpact(data, pre.period, post.period, model.args)
    2. CausalImpact:::RunWithData(...)
    3. CausalImpact:::CompilePosteriorInferences(...)
    4. CausalImpact:::CompileSummaryTable(...)
    5. dplyr::mutate
    6. base::getExportedValue(pkg, name)
    7. base::asNamespace(ns)
    8. base::getNamespace(ns)
    9. base::loadNamespace(name)
   10. base::library.dynam(lib, package, package.lib)
  
  -- 6. Error: CausalImpact.RunWithData.ShortTimeSeries (@test-impact-analysis.R#5
  DLL 'dplyr' not found: maybe not installed for this architecture?
  Backtrace:
    1. base::suppressWarnings(...)
    3. CausalImpact::CausalImpact(data, pre.period, post.period, model.args)
    4. CausalImpact:::RunWithData(...)
    5. CausalImpact:::CompilePosteriorInferences(...)
    6. CausalImpact:::CompileSummaryTable(...)
    7. dplyr::mutate
    8. base::getExportedValue(pkg, name)
    9. base::asNamespace(ns)
   10. base::getNamespace(ns)
   11. base::loadNamespace(name)
   12. base::library.dynam(lib, package, package.lib)
  
  -- 7. Failure: CausalImpact.RunWithData.LargeIntegerInput (@test-impact-analysis
  `impact <- CausalImpact(data, pre.period, post.period)` threw an error.
  Message: DLL 'dplyr' not found: maybe not installed for this architecture?
  Class:   simpleError/error/condition
  Backtrace:
    1. testthat::expect_error(...)
    6. CausalImpact::CausalImpact(data, pre.period, post.period)
    7. CausalImpact:::RunWithData(...)
    8. CausalImpact:::CompilePosteriorInferences(...)
    9. CausalImpact:::CompileSummaryTable(...)
   10. dplyr::mutate
   11. base::getExportedValue(pkg, name)
   12. base::asNamespace(ns)
   13. base::getNamespace(ns)
   14. base::loadNamespace(name)
   15. base::library.dynam(lib, package, package.lib)
  
  -- 8. Error: CausalImpact.RunWithData.LargeIntegerInput (@test-impact-analysis.R
  DLL 'dplyr' not found: maybe not installed for this architecture?
  Backtrace:
    1. CausalImpact::CausalImpact(rescaled.data, pre.period, post.period)
    2. CausalImpact:::RunWithData(...)
    3. CausalImpact:::CompilePosteriorInferences(...)
    4. CausalImpact:::CompileSummaryTable(...)
    5. dplyr::mutate
    6. base::getExportedValue(pkg, name)
    7. base::asNamespace(ns)
    8. base::getNamespace(ns)
    9. base::loadNamespace(name)
   10. base::library.dynam(lib, package, package.lib)
  
  -- 9. Error: CausalImpact.RunWithData.MissingTimePoint (@test-impact-analysis.R#
  DLL 'dplyr' not found: maybe not installed for this architecture?
  Backtrace:
    1. CausalImpact::CausalImpact(...)
    2. CausalImpact:::RunWithData(...)
    3. CausalImpact:::CompilePosteriorInferences(...)
    4. CausalImpact:::CompileSummaryTable(...)
    5. dplyr::mutate
    6. base::getExportedValue(pkg, name)
    7. base::asNamespace(ns)
    8. base::getNamespace(ns)
    9. base::loadNamespace(name)
   10. base::library.dynam(lib, package, package.lib)
  
  -- 10. Error: CausalImpact.RunWithBstsModel (@test-impact-analysis.R#600)  -----
  DLL 'dplyr' not found: maybe not installed for this architecture?
  Backtrace:
    1. CausalImpact::CausalImpact(bsts.model = bsts.model, post.period.response = post.period.response)
    2. CausalImpact:::RunWithBstsModel(...)
    3. CausalImpact:::CompilePosteriorInferences(...)
    4. CausalImpact:::CompileSummaryTable(...)
    5. dplyr::mutate
    6. base::getExportedValue(pkg, name)
    7. base::asNamespace(ns)
    8. base::getNamespace(ns)
    9. base::loadNamespace(name)
   10. base::library.dynam(lib, package, package.lib)
  
  -- 11. Error: CausalImpact.RunWithMaxFlips (@test-impact-analysis.R#689)  ------
  DLL 'dplyr' not found: maybe not installed for this architecture?
  Backtrace:
    1. base::suppressWarnings(...)
    3. CausalImpact::CausalImpact(data, pre.period, post.period, model.args)
    4. CausalImpact:::RunWithData(...)
    5. CausalImpact:::CompilePosteriorInferences(...)
    6. CausalImpact:::CompileSummaryTable(...)
    7. dplyr::mutate
    8. base::getExportedValue(pkg, name)
    9. base::asNamespace(ns)
   10. base::getNamespace(ns)
   11. base::loadNamespace(name)
   12. base::library.dynam(lib, package, package.lib)
  
  -- 12. Error: PrintSummary (@test-impact-analysis.R#703)  ----------------------
  DLL 'dplyr' not found: maybe not installed for this architecture?
  Backtrace:
    1. base::suppressWarnings(...)
    3. CausalImpact::CausalImpact(data, pre.period, post.period, model.args)
    4. CausalImpact:::RunWithData(...)
    5. CausalImpact:::CompilePosteriorInferences(...)
    6. CausalImpact:::CompileSummaryTable(...)
    7. dplyr::mutate
    8. base::getExportedValue(pkg, name)
    9. base::asNamespace(ns)
   10. base::getNamespace(ns)
   11. base::loadNamespace(name)
   12. base::library.dynam(lib, package, package.lib)
  
  -- 13. Error: PrintReport (@test-impact-analysis.R#732)  -----------------------
  DLL 'dplyr' not found: maybe not installed for this architecture?
  Backtrace:
    1. base::suppressWarnings(...)
    3. CausalImpact::CausalImpact(data, pre.period, post.period, model.args)
    4. CausalImpact:::RunWithData(...)
    5. CausalImpact:::CompilePosteriorInferences(...)
    6. CausalImpact:::CompileSummaryTable(...)
    7. dplyr::mutate
    8. base::getExportedValue(pkg, name)
    9. base::asNamespace(ns)
   10. base::getNamespace(ns)
   11. base::loadNamespace(name)
   12. base::library.dynam(lib, package, package.lib)
  
  -- 14. Error: CompileSummaryTable (@test-impact-inference.R#133)  --------------
  DLL 'dplyr' not found: maybe not installed for this architecture?
  Backtrace:
   1. CausalImpact:::CompileSummaryTable(y.post, y.samples.post, point.pred.mean.post)
   2. dplyr::mutate
   3. base::getExportedValue(pkg, name)
   4. base::asNamespace(ns)
   5. base::getNamespace(ns)
   6. base::loadNamespace(name)
   7. base::library.dynam(lib, package, package.lib)
  
  -- 15. Error: InterpretSummaryTable (@test-impact-inference.R#181)  ------------
  DLL 'dplyr' not found: maybe not installed for this architecture?
  Backtrace:
   1. CausalImpact:::CompileSummaryTable(y.post, y.samples.post, point.pred.mean.post)
   2. dplyr::mutate
   3. base::getExportedValue(pkg, name)
   4. base::asNamespace(ns)
   5. base::getNamespace(ns)
   6. base::loadNamespace(name)
   7. base::library.dynam(lib, package, package.lib)
  
  -- 16. Error: CompilePosteriorInferences (@test-impact-inference.R#283)  -------
  DLL 'dplyr' not found: maybe not installed for this architecture?
  Backtrace:
   1. CausalImpact:::CompilePosteriorInferences(...)
   2. CausalImpact:::CompileSummaryTable(...)
   3. dplyr::mutate
   4. base::getExportedValue(pkg, name)
   5. base::asNamespace(ns)
   6. base::getNamespace(ns)
   7. base::loadNamespace(name)
   8. base::library.dynam(lib, package, package.lib)
  
  [1] -2
  [1] 9.1
  [1] "foo"
  [1] 100 200
  -- 17. Error: CreateImpactPlot (@test-impact-plot.R#104)  ----------------------
  DLL 'dplyr' not found: maybe not installed for this architecture?
  Backtrace:
    1. base::suppressWarnings(...)
    3. CausalImpact::CausalImpact(data, pre.period, post.period, model.args)
    4. CausalImpact:::RunWithData(...)
    5. CausalImpact:::CompilePosteriorInferences(...)
    6. CausalImpact:::CompileSummaryTable(...)
    7. dplyr::mutate
    8. base::getExportedValue(pkg, name)
    9. base::asNamespace(ns)
   10. base::getNamespace(ns)
   11. base::loadNamespace(name)
   12. base::library.dynam(lib, package, package.lib)
  
  == testthat results  ===========================================================
  [ OK: 474 | SKIPPED: 0 | WARNINGS: 10 | FAILED: 17 ]
  1. Error: CausalImpact.RunWithData.DataFormats (@test-impact-analysis.R#240) 
  2. Error: CausalImpact.RunWithData.PreAndPostPeriod (@test-impact-analysis.R#308) 
  3. Failure: CausalImpact.RunWithData.MissingValues (@test-impact-analysis.R#411) 
  4. Error: CausalImpact.RunWithData.MissingValues (@test-impact-analysis.R#417) 
  5. Error: CausalImpact.RunWithData.StandardizeData (@test-impact-analysis.R#463) 
  6. Error: CausalImpact.RunWithData.ShortTimeSeries (@test-impact-analysis.R#503) 
  7. Failure: CausalImpact.RunWithData.LargeIntegerInput (@test-impact-analysis.R#550) 
  8. Error: CausalImpact.RunWithData.LargeIntegerInput (@test-impact-analysis.R#556) 
  9. Error: CausalImpact.RunWithData.MissingTimePoint (@test-impact-analysis.R#581) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted