Running 'testthat.R' [264s]
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
  == 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.1 --
  v ggplot2 3.3.6     v purrr   0.3.4
  v tibble  3.1.7     v dplyr   1.0.9
  v tidyr   1.2.0     v stringr 1.4.0
  v readr   2.1.2     v forcats 0.5.1
  -- Conflicts ------------------------------------------ tidyverse_conflicts() --
  x lubridate::as.difftime() masks base::as.difftime()
  x lubridate::date()        masks base::date()
  x readr::edition_get()     masks testthat::edition_get()
  x dplyr::filter()          masks stats::filter()
  x dplyr::first()           masks xts::first()
  x lubridate::intersect()   masks base::intersect()
  x purrr::is_null()         masks testthat::is_null()
  x dplyr::lag()             masks stats::lag()
  x dplyr::last()            masks xts::last()
  x readr::local_edition()   masks testthat::local_edition()
  x dplyr::matches()         masks tidyr::matches(), testthat::matches()
  x lubridate::setdiff()     masks base::setdiff()
  x lubridate::union()       masks base::union()
  > library(dplyr)
  > library(tibble)
  > 
  > test_check("tidyquant")
  [ FAIL 11 | WARN 10 | SKIP 3 | PASS 59 ]
  
  == Skipped tests ===============================================================
  * On CRAN (2)
  * On Windows (1)
  
  == Failed tests ================================================================
  -- Failure (test-tq_get_economic_data.R:20:5): Test returns tibble with correct rows and columns. --
  `test1` inherits from `'logical'` not `'character'`.
  -- Failure (test-tq_get_economic_data.R:21:5): Test returns tibble with correct rows and columns. --
  `test2` inherits from `'logical'` not `'character'`.
  -- Failure (test-tq_get_economic_data.R:25:5): Test returns tibble with correct rows and columns. --
  nrow(test1) not equal to 6.
  target is NULL, current is numeric
  -- Failure (test-tq_get_economic_data.R:27:5): Test returns tibble with correct rows and columns. --
  ncol(test1) not equal to 3.
  target is NULL, current is numeric
  -- Failure (test-tq_get_stock_prices.R:17:5): Test 1 returns tibble with correct rows and columns. --
  `test1` inherits from `'logical'` not `'character'`.
  -- Failure (test-tq_get_stock_prices.R:19:5): Test 1 returns tibble with correct rows and columns. --
  nrow(test1) not equal to 103.
  target is NULL, current is numeric
  -- Failure (test-tq_get_stock_prices.R:21:5): Test 1 returns tibble with correct rows and columns. --
  ncol(test1) not equal to 8.
  target is NULL, current is numeric
  -- Failure (test-tq_get_stock_prices.R:28:5): Test 2 returns tibble with correct rows and columns. --
  nrow(test2) not equal to 206.
  1/1 mismatches
  [1] 0 - 206 == -206
  -- Failure (test-tq_get_stock_prices.R:30:5): Test 2 returns tibble with correct rows and columns. --
  ncol(test2) not equal to 8.
  1/1 mismatches
  [1] 2 - 8 == -6
  -- Error (test-tq_mutate.R:8:1): (code run outside of `test_that()`) -----------
  Error in `tq_mutate_.default(data = data, select = lazyeval::expr_text(select), 
      mutate_fun = lazyeval::expr_text(mutate_fun), col_rename = col_rename, 
      ... = ...)`: data must be a tibble or data.frame object
  Backtrace:
      x
   1. +-... %>% tq_mutate(open:close, OpCl) at test-tq_mutate.R:8:0
   2. +-tidyquant::tq_mutate(., open:close, OpCl)
   3. | \-tidyquant::tq_mutate_(...)
   4. +-tidyquant::tq_mutate(., high:close, BBands)
   5. | \-tidyquant::tq_mutate_(...)
   6. \-tidyquant::tq_mutate(., close, MACD)
   7.   +-tidyquant::tq_mutate_(...)
   8.   \-tidyquant:::tq_mutate_.default(...)
  -- Error (test-tq_performance.R:23:1): (code run outside of `test_that()`) -----
  Error in `left_join(Ra, Rb, by = c(date = "date"))`: Join columns must be present in data.
  x Problem with `date`.
  Backtrace:
      x
   1. +-dplyr::left_join(Ra, Rb, by = c(date = "date")) at test-tq_performance.R:23:0
   2. \-dplyr:::left_join.data.frame(Ra, Rb, by = c(date = "date"))
   3.   \-dplyr:::join_mutate(...)
   4.     \-dplyr:::join_cols(...)
   5.       \-dplyr:::standardise_join_by(...)
   6.         \-dplyr:::check_join_vars(by$x, x_names, error_call = error_call)
   7.           \-rlang::abort(bullets, call = error_call)
  
  [ FAIL 11 | WARN 10 | SKIP 3 | PASS 59 ]
  Error: Test failures
  In addition: Warning messages:
  1: In .Internal(lapply(X, FUN)) :
    closing unused connection 7 (https://fred.stlouisfed.org/series/XYZ/downloaddata/XYZ.csv)
  2: In .Internal(lapply(X, FUN)) :
    closing unused connection 6 (https://fred.stlouisfed.org/series/XYZ/downloaddata/XYZ.csv)
  3: In .Internal(lapply(X, FUN)) :
    closing unused connection 5 (https://fred.stlouisfed.org/series/CPIAUCSL/downloaddata/CPIAUCSL.csv)
  4: In .Internal(lapply(X, FUN)) :
    closing unused connection 4 (https://fred.stlouisfed.org/series/CPIAUCSL/downloaddata/CPIAUCSL.csv)
  Execution halted