Running ‘testthat.R’ [12s/27s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(tidyquant)
  Loading required package: lubridate
  
  Attaching package: 'lubridate'
  
  The following objects are masked from 'package:base':
  
      date, intersect, setdiff, union
  
  Loading required package: PerformanceAnalytics
  Loading required package: xts
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  
  Attaching package: 'PerformanceAnalytics'
  
  The following object is masked from 'package:graphics':
  
      legend
  
  Loading required package: quantmod
  Loading required package: TTR
  Version 0.4-0 included new data defaults. See ?getSymbols.
  ══ Need to Learn tidyquant? ════════════════════════════════════════════════════
  Business Science offers a 1-hour course - Learning Lab #9: Performance Analysis & Portfolio Optimization with tidyquant!
  </> Learn more at: https://university.business-science.io/p/learning-labs-pro </>
  > library(tidyverse)
  ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
  ✔ ggplot2 3.3.0     ✔ purrr   0.3.4
  ✔ tibble  3.0.1     ✔ dplyr   0.8.5
  ✔ tidyr   1.0.3     ✔ stringr 1.4.0
  ✔ readr   1.3.1     ✔ forcats 0.5.0
  ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
  ✖ lubridate::as.difftime() masks base::as.difftime()
  ✖ lubridate::date()        masks base::date()
  ✖ dplyr::filter()          masks stats::filter()
  ✖ dplyr::first()           masks xts::first()
  ✖ lubridate::intersect()   masks base::intersect()
  ✖ purrr::is_null()         masks testthat::is_null()
  ✖ dplyr::lag()             masks stats::lag()
  ✖ dplyr::last()            masks xts::last()
  ✖ dplyr::matches()         masks tidyr::matches(), testthat::matches()
  ✖ lubridate::setdiff()     masks base::setdiff()
  ✖ lubridate::union()       masks base::union()
  > library(dplyr)
  > library(tibble)
  > 
  > test_check("tidyquant")
  ── 1. Error: (unknown) (@test-tq_portfolio.R#31)  ──────────────────────────────
  'where' must be an environment
  Backtrace:
    1. tidyquant::tq_portfolio(...)
    3. tidyquant:::tq_portfolio_.grouped_df(...)
    5. tidyquant:::tq_portfolio_.tbl_df(...)
    6. tidyquant:::tq_portfolio_base_(...)
    7. base::tryCatch(...)
    8. base:::tryCatchList(expr, classes, parentenv, handlers)
    9. base:::tryCatchOne(expr, names, parentenv, handlers[[1L]])
   10. value[[3L]](cond)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 95 | SKIPPED: 2 | WARNINGS: 0 | FAILED: 1 ]
  1. Error: (unknown) (@test-tq_portfolio.R#31) 
  
  Error: testthat unit tests failed
  In addition: Warning messages:
  1: closing unused connection 10 (https://query2.finance.yahoo.com/v7/finance/download/AAPL?period1=1262304000&period2=1420070400&interval=1d&events=history&crumb=ImICHPYWBqB) 
  2: closing unused connection 9 (https://query1.finance.yahoo.com/v7/finance/download/XYZ?period1=1262304000&period2=1589155200&interval=1d&events=history&crumb=ImICHPYWBqB) 
  3: closing unused connection 8 (https://query2.finance.yahoo.com/v7/finance/download/XYZ?period1=1262304000&period2=1589155200&interval=1d&events=history&crumb=2Dn5UCmBF9h) 
  4: closing unused connection 7 (https://query1.finance.yahoo.com/v7/finance/download/XYZ?period1=1262304000&period2=1589155200&interval=1d&events=history&crumb=2Dn5UCmBF9h) 
  5: closing unused connection 6 (https://query1.finance.yahoo.com/v7/finance/download/XYZ?period1=1262304000&period2=1589155200&interval=1d&events=history&crumb=7jcKzovUCpx) 
  6: closing unused connection 5 (https://fred.stlouisfed.org/series/XYZ/downloaddata/XYZ.csv) 
  7: closing unused connection 4 (https://fred.stlouisfed.org/series/XYZ/downloaddata/XYZ.csv) 
  Execution halted