Running ‘testthat.R’ [266s/411s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(tidyquant)
  Loading required package: lubridate
  
  Attaching package: 'lubridate'
  
  The following object is masked from 'package:base':
  
      date
  
  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.
  Loading required package: tidyverse
  ── Attaching packages ─────────────────────────────────────── tidyverse 1.2.1 ──
  ✔ ggplot2 3.2.1     ✔ purrr   0.3.2
  ✔ tibble  2.1.3     ✔ dplyr   0.8.3
  ✔ tidyr   0.8.3     ✔ stringr 1.4.0
  ✔ readr   1.3.1     ✔ forcats 0.4.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 testthat::matches()
  ✖ lubridate::setdiff()     masks base::setdiff()
  ✖ lubridate::union()       masks base::union()
  > 
  > test_check("tidyquant")
  ── 1. Failure: Test 1 returns tibble with correct rows and columns. (@test_tq_ge
  nrow(test1) not equal to 1.
  1/1 mismatches
  [1] 0 - 1 == -1
  
  ── 2. Failure: Test 2 returns tibble with correct rows and columns. (@test_tq_ge
  nrow(test2) not equal to 2.
  1/1 mismatches
  [1] 0 - 2 == -2
  
  ── 3. Failure: Test 3 returns tibble with correct rows and columns. (@test_tq_ge
  nrow(test3) not equal to 3.
  1/1 mismatches
  [1] 0 - 3 == -3
  
  ── 4. Failure: Test returns tibble with correct rows and columns. (@test_tq_get_
  `test1` inherits from `logical` not `tbl`.
  
  ── 5. Failure: Test returns tibble with correct rows and columns. (@test_tq_get_
  nrow(test1) not equal to 2.
  target is NULL, current is numeric
  
  ── 6. Failure: Test returns tibble with correct rows and columns. (@test_tq_get_
  ncol(test1) not equal to 2.
  target is NULL, current is numeric
  
  ── 7. Failure: Test returns tibble with correct rows and columns. (@test_tq_get_
  `test1` inherits from `logical` not `tbl`.
  
  ── 8. Failure: Test returns tibble with correct rows and columns. (@test_tq_get_
  nrow(test1) not equal to 3.
  target is NULL, current is numeric
  
  ── 9. Failure: Test returns tibble with correct rows and columns. (@test_tq_get_
  ncol(test1) not equal to 2.
  target is NULL, current is numeric
  
  ── 10. Failure: Test 1 returns tibble with correct rows and columns. (@test_tq_g
  `test1` inherits from `logical` not `tbl`.
  
  ── 11. Failure: Test 1 returns tibble with correct rows and columns. (@test_tq_g
  nrow(test1) not equal to 103.
  target is NULL, current is numeric
  
  ── 12. Failure: Test 1 returns tibble with correct rows and columns. (@test_tq_g
  ncol(test1) not equal to 7.
  target is NULL, current is numeric
  
  ── 13. Failure: Test 2 returns tibble with correct rows and columns. (@test_tq_g
  nrow(test2) not equal to 206.
  1/1 mismatches
  [1] 0 - 206 == -206
  
  ── 14. Failure: Test 2 returns tibble with correct rows and columns. (@test_tq_g
  ncol(test2) not equal to 8.
  1/1 mismatches
  [1] 1 - 8 == -7
  
  ── 15. Error: (unknown) (@test_tq_mutate.R#8)  ─────────────────────────────────
  data must be a tibble or data.frame object
  1: AAPL %>% tq_mutate(close, MACD) %>% tq_mutate(high:close, BBands) %>% tq_mutate(open:close, 
         OpCl) at testthat/test_tq_mutate.R:8
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: tq_mutate(., close, MACD)
  9: tq_mutate_(data = data, select = lazyeval::expr_text(select), mutate_fun = lazyeval::expr_text(mutate_fun), 
         col_rename = col_rename, ... = ...)
  10: tq_mutate_.default(data = data, select = lazyeval::expr_text(select), mutate_fun = lazyeval::expr_text(mutate_fun), 
         col_rename = col_rename, ... = ...)
  11: stop("data must be a tibble or data.frame object")
  
  ── 16. Error: (unknown) (@test_tq_performance.R#16)  ───────────────────────────
  data must be a tibble or data.frame object
  1: "^GSPC" %>% tq_get(get = "stock.prices", from = "2010-01-01", to = "2015-12-31") %>% 
         tq_transmute(adjusted, periodReturn, period = "monthly", col_rename = "Rb") at testthat/test_tq_performance.R:16
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: withVisible(function_list[[k]](value))
  8: function_list[[k]](value)
  9: tq_transmute(., adjusted, periodReturn, period = "monthly", col_rename = "Rb")
  10: tq_transmute_(data = data, select = lazyeval::expr_text(select), mutate_fun = lazyeval::expr_text(mutate_fun), 
         col_rename = col_rename, ... = ...)
  11: tq_transmute_.default(data = data, select = lazyeval::expr_text(select), mutate_fun = lazyeval::expr_text(mutate_fun), 
         col_rename = col_rename, ... = ...)
  12: stop("data must be a tibble or data.frame object")
  
  ── 17. Error: (unknown) (@test_tq_portfolio.R#21)  ─────────────────────────────
  No date or POSIXct column found in `data`.
  1: tq_portfolio(data = portfolio_monthly_returns, assets_col = symbol, returns_col = monthly.returns, 
         weights = weights, col_rename = NULL, wealth.index = FALSE) at testthat/test_tq_portfolio.R:21
  2: tq_portfolio_(data = data, assets_col = lazyeval::expr_text(assets_col), returns_col = lazyeval::expr_text(returns_col), 
         weights = weights, col_rename = col_rename, ... = ...)
  3: tq_portfolio_.grouped_df(data = data, assets_col = lazyeval::expr_text(assets_col), 
         returns_col = lazyeval::expr_text(returns_col), weights = weights, col_rename = col_rename, 
         ... = ...)
  4: tq_portfolio_(data = data, assets_col = assets_col, returns_col = returns_col, weights = weights, 
         col_rename = col_rename, ... = ...)
  5: tq_portfolio_.tbl_df(data = data, assets_col = assets_col, returns_col = returns_col, 
         weights = weights, col_rename = col_rename, ... = ...)
  6: tq_portfolio_base_(data = data, assets_col = assets_col, returns_col = returns_col, 
         weights = weights, col_rename = col_rename, ...)
  7: get_col_name_date_or_date_time(data)
  8: stop("No date or POSIXct column found in `data`.")
  
  ── 18. Error: (unknown) (@test_tq_transmute.R#8)  ──────────────────────────────
  data must be a tibble or data.frame object
  1: AAPL %>% tq_transmute(select = close, mutate_fun = to.period, period = "months") at testthat/test_tq_transmute.R:8
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: withVisible(function_list[[k]](value))
  8: function_list[[k]](value)
  9: tq_transmute(., select = close, mutate_fun = to.period, period = "months")
  10: tq_transmute_(data = data, select = lazyeval::expr_text(select), mutate_fun = lazyeval::expr_text(mutate_fun), 
         col_rename = col_rename, ... = ...)
  11: tq_transmute_.default(data = data, select = lazyeval::expr_text(select), mutate_fun = lazyeval::expr_text(mutate_fun), 
         col_rename = col_rename, ... = ...)
  12: stop("data must be a tibble or data.frame object")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 49 | SKIPPED: 1 | WARNINGS: 20 | FAILED: 18 ]
  1. Failure: Test 1 returns tibble with correct rows and columns. (@test_tq_get_compound_getters.R#24) 
  2. Failure: Test 2 returns tibble with correct rows and columns. (@test_tq_get_compound_getters.R#33) 
  3. Failure: Test 3 returns tibble with correct rows and columns. (@test_tq_get_compound_getters.R#42) 
  4. Failure: Test returns tibble with correct rows and columns. (@test_tq_get_dividends.R#15) 
  5. Failure: Test returns tibble with correct rows and columns. (@test_tq_get_dividends.R#17) 
  6. Failure: Test returns tibble with correct rows and columns. (@test_tq_get_dividends.R#19) 
  7. Failure: Test returns tibble with correct rows and columns. (@test_tq_get_splits.R#15) 
  8. Failure: Test returns tibble with correct rows and columns. (@test_tq_get_splits.R#17) 
  9. Failure: Test returns tibble with correct rows and columns. (@test_tq_get_splits.R#19) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted