Running ‘testthat.R’ [3s/15s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ubci)
  > 
  > test_check("ubci")
  ── 1. Error: colume check (@test-ubci_index.R#4)  ──────────────────────────────
  All nested columns must have the same number of elements.
  1: ubci_index("UBAI") at testthat/test-ubci_index.R:4
  2: dat %>% tidyr::unnest() %>% tibble::as_tibble() %>% dplyr::mutate(date = lubridate::ymd(lubridate::ymd_hms(candleDateTime)), 
         index = toupper(gsub("IDX\\.UPBIT\\.", "", code)), open = openingPrice, high = highPrice, 
         low = lowPrice, close = tradePrice) %>% dplyr::select(index, date, open, high, 
         low, close)
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: function_list[[i]](value)
  9: tidyr::unnest(.)
  10: unnest.data.frame(.)
  11: abort("All nested columns must have the same number of elements.")
  
  ── 2. Error: index check 1 (@test-ubci_index.R#11)  ────────────────────────────
  All nested columns must have the same number of elements.
  1: ubci_index(expect) at testthat/test-ubci_index.R:11
  2: dat %>% tidyr::unnest() %>% tibble::as_tibble() %>% dplyr::mutate(date = lubridate::ymd(lubridate::ymd_hms(candleDateTime)), 
         index = toupper(gsub("IDX\\.UPBIT\\.", "", code)), open = openingPrice, high = highPrice, 
         low = lowPrice, close = tradePrice) %>% dplyr::select(index, date, open, high, 
         low, close)
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: function_list[[i]](value)
  9: tidyr::unnest(.)
  10: unnest.data.frame(.)
  11: abort("All nested columns must have the same number of elements.")
  
  ── 3. Error: index check 2 (@test-ubci_index.R#18)  ────────────────────────────
  All nested columns must have the same number of elements.
  1: ubci_index(expect) at testthat/test-ubci_index.R:18
  2: dat %>% tidyr::unnest() %>% tibble::as_tibble() %>% dplyr::mutate(date = lubridate::ymd(lubridate::ymd_hms(candleDateTime)), 
         index = toupper(gsub("IDX\\.UPBIT\\.", "", code)), open = openingPrice, high = highPrice, 
         low = lowPrice, close = tradePrice) %>% dplyr::select(index, date, open, high, 
         low, close)
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: function_list[[i]](value)
  9: tidyr::unnest(.)
  10: unnest.data.frame(.)
  11: abort("All nested columns must have the same number of elements.")
  
  ── 4. Error: index check 3 (@test-ubci_index.R#25)  ────────────────────────────
  All nested columns must have the same number of elements.
  1: ubci_index(expect) at testthat/test-ubci_index.R:25
  2: dat %>% tidyr::unnest() %>% tibble::as_tibble() %>% dplyr::mutate(date = lubridate::ymd(lubridate::ymd_hms(candleDateTime)), 
         index = toupper(gsub("IDX\\.UPBIT\\.", "", code)), open = openingPrice, high = highPrice, 
         low = lowPrice, close = tradePrice) %>% dplyr::select(index, date, open, high, 
         low, close)
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: function_list[[i]](value)
  9: tidyr::unnest(.)
  10: unnest.data.frame(.)
  11: abort("All nested columns must have the same number of elements.")
  
  ── 5. Error: date check from (@test-ubci_index.R#31)  ──────────────────────────
  All nested columns must have the same number of elements.
  1: tail(ubci_index("UBAI", from = "2018-05-01"), 1) at testthat/test-ubci_index.R:31
  2: ubci_index("UBAI", from = "2018-05-01")
  3: dat %>% tidyr::unnest() %>% tibble::as_tibble() %>% dplyr::mutate(date = lubridate::ymd(lubridate::ymd_hms(candleDateTime)), 
         index = toupper(gsub("IDX\\.UPBIT\\.", "", code)), open = openingPrice, high = highPrice, 
         low = lowPrice, close = tradePrice) %>% dplyr::select(index, date, open, high, 
         low, close)
  4: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: `_fseq`(`_lhs`)
  8: freduce(value, `_function_list`)
  9: function_list[[i]](value)
  10: tidyr::unnest(.)
  11: unnest.data.frame(.)
  12: abort("All nested columns must have the same number of elements.")
  
  ── 6. Error: date check to (@test-ubci_index.R#36)  ────────────────────────────
  All nested columns must have the same number of elements.
  1: head(ubci_index("UBAI", to = "2018-05-01"), 1) at testthat/test-ubci_index.R:36
  2: ubci_index("UBAI", to = "2018-05-01")
  3: dat %>% tidyr::unnest() %>% tibble::as_tibble() %>% dplyr::mutate(date = lubridate::ymd(lubridate::ymd_hms(candleDateTime)), 
         index = toupper(gsub("IDX\\.UPBIT\\.", "", code)), open = openingPrice, high = highPrice, 
         low = lowPrice, close = tradePrice) %>% dplyr::select(index, date, open, high, 
         low, close)
  4: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: `_fseq`(`_lhs`)
  8: freduce(value, `_function_list`)
  9: function_list[[i]](value)
  10: tidyr::unnest(.)
  11: unnest.data.frame(.)
  12: abort("All nested columns must have the same number of elements.")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 10 SKIPPED: 0 FAILED: 6
  1. Error: colume check (@test-ubci_index.R#4) 
  2. Error: index check 1 (@test-ubci_index.R#11) 
  3. Error: index check 2 (@test-ubci_index.R#18) 
  4. Error: index check 3 (@test-ubci_index.R#25) 
  5. Error: date check from (@test-ubci_index.R#31) 
  6. Error: date check to (@test-ubci_index.R#36) 
  
  Error: testthat unit tests failed
  Execution halted