Running 'testthat.R' [12s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(ubci)
  > 
  > test_check("ubci")
  -- 1. Error: colume check (@test-ubci_get.R#4)  --------------------------------
  Please install xml2 package
  1: ubci_get("UPBIT.KRW-BTC") at testthat/test-ubci_get.R:4
  2: httr::GET(tar) %>% httr::content()
  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: withVisible(function_list[[k]](value))
  9: function_list[[k]](value)
  10: httr::content(.)
  11: parse_auto(raw, type, encoding, ...)
  12: parser(x = content, type = type, encoding = encoding, ...)
  13: need_package("xml2")
  14: stop("Please install ", pkg, " package", call. = FALSE)
  
  -- 2. Error: code check (@test-ubci_get.R#11)  ---------------------------------
  Please install xml2 package
  1: ubci_get(expect) at testthat/test-ubci_get.R:11
  2: httr::GET(tar) %>% httr::content()
  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: withVisible(function_list[[k]](value))
  9: function_list[[k]](value)
  10: httr::content(.)
  11: parse_auto(raw, type, encoding, ...)
  12: parser(x = content, type = type, encoding = encoding, ...)
  13: need_package("xml2")
  14: stop("Please install ", pkg, " package", call. = FALSE)
  
  -- 3. Error: date check from (@test-ubci_get.R#17)  ----------------------------
  Please install xml2 package
  1: tail(ubci_get("UPBIT.KRW-BTC", from = Sys.Date() - 5), 1) at testthat/test-ubci_get.R:17
  2: ubci_get("UPBIT.KRW-BTC", from = Sys.Date() - 5)
  3: httr::GET(tar) %>% httr::content()
  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: withVisible(function_list[[k]](value))
  10: function_list[[k]](value)
  11: httr::content(.)
  12: parse_auto(raw, type, encoding, ...)
  13: parser(x = content, type = type, encoding = encoding, ...)
  14: need_package("xml2")
  15: stop("Please install ", pkg, " package", call. = FALSE)
  
  -- 4. Error: date check to (@test-ubci_get.R#22)  ------------------------------
  Please install xml2 package
  1: head(ubci_get("UPBIT.KRW-BTC", to = Sys.Date() - 2), 1) at testthat/test-ubci_get.R:22
  2: ubci_get("UPBIT.KRW-BTC", to = Sys.Date() - 2)
  3: httr::GET(tar) %>% httr::content()
  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: withVisible(function_list[[k]](value))
  10: function_list[[k]](value)
  11: httr::content(.)
  12: parse_auto(raw, type, encoding, ...)
  13: parser(x = content, type = type, encoding = encoding, ...)
  14: need_package("xml2")
  15: stop("Please install ", pkg, " package", call. = FALSE)
  
  -- 5. Error: colume check (@test-ubci_index.R#4)  ------------------------------
  Please install xml2 package
  1: ubci_index("UBAI") at testthat/test-ubci_index.R:4
  2: httr::GET(tar) %>% httr::content() %>% do.call(rbind, .) %>% data.frame() %>% dplyr::select(candleDateTime, 
         code, openingPrice, highPrice, lowPrice, tradePrice) %>% lapply(unlist) %>% dplyr::bind_cols() %>% 
         dplyr::transmute(index = toupper(gsub("IDX\\.UPBIT\\.", "", code)), date = lubridate::ymd(lubridate::ymd_hms(candleDateTime)), 
             open = openingPrice, high = highPrice, low = lowPrice, close = tradePrice)
  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: httr::content(.)
  10: parse_auto(raw, type, encoding, ...)
  11: parser(x = content, type = type, encoding = encoding, ...)
  12: need_package("xml2")
  13: stop("Please install ", pkg, " package", call. = FALSE)
  
  -- 6. Error: index check 1 (@test-ubci_index.R#11)  ----------------------------
  Please install xml2 package
  1: ubci_index(expect) at testthat/test-ubci_index.R:11
  2: httr::GET(tar) %>% httr::content() %>% do.call(rbind, .) %>% data.frame() %>% dplyr::select(candleDateTime, 
         code, openingPrice, highPrice, lowPrice, tradePrice) %>% lapply(unlist) %>% dplyr::bind_cols() %>% 
         dplyr::transmute(index = toupper(gsub("IDX\\.UPBIT\\.", "", code)), date = lubridate::ymd(lubridate::ymd_hms(candleDateTime)), 
             open = openingPrice, high = highPrice, low = lowPrice, close = tradePrice)
  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: httr::content(.)
  10: parse_auto(raw, type, encoding, ...)
  11: parser(x = content, type = type, encoding = encoding, ...)
  12: need_package("xml2")
  13: stop("Please install ", pkg, " package", call. = FALSE)
  
  -- 7. Error: index check 2 (@test-ubci_index.R#18)  ----------------------------
  Please install xml2 package
  1: ubci_index(expect) at testthat/test-ubci_index.R:18
  2: httr::GET(tar) %>% httr::content() %>% do.call(rbind, .) %>% data.frame() %>% dplyr::select(candleDateTime, 
         code, openingPrice, highPrice, lowPrice, tradePrice) %>% lapply(unlist) %>% dplyr::bind_cols() %>% 
         dplyr::transmute(index = toupper(gsub("IDX\\.UPBIT\\.", "", code)), date = lubridate::ymd(lubridate::ymd_hms(candleDateTime)), 
             open = openingPrice, high = highPrice, low = lowPrice, close = tradePrice)
  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: httr::content(.)
  10: parse_auto(raw, type, encoding, ...)
  11: parser(x = content, type = type, encoding = encoding, ...)
  12: need_package("xml2")
  13: stop("Please install ", pkg, " package", call. = FALSE)
  
  -- 8. Error: index check 3 (@test-ubci_index.R#25)  ----------------------------
  Please install xml2 package
  1: ubci_index(expect) at testthat/test-ubci_index.R:25
  2: httr::GET(tar) %>% httr::content() %>% do.call(rbind, .) %>% data.frame() %>% dplyr::select(candleDateTime, 
         code, openingPrice, highPrice, lowPrice, tradePrice) %>% lapply(unlist) %>% dplyr::bind_cols() %>% 
         dplyr::transmute(index = toupper(gsub("IDX\\.UPBIT\\.", "", code)), date = lubridate::ymd(lubridate::ymd_hms(candleDateTime)), 
             open = openingPrice, high = highPrice, low = lowPrice, close = tradePrice)
  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: httr::content(.)
  10: parse_auto(raw, type, encoding, ...)
  11: parser(x = content, type = type, encoding = encoding, ...)
  12: need_package("xml2")
  13: stop("Please install ", pkg, " package", call. = FALSE)
  
  -- 9. Error: date check from (@test-ubci_index.R#31)  --------------------------
  Please install xml2 package
  1: tail(ubci_index("UBAI", from = Sys.Date() - 5), 1) at testthat/test-ubci_index.R:31
  2: ubci_index("UBAI", from = Sys.Date() - 5)
  3: httr::GET(tar) %>% httr::content() %>% do.call(rbind, .) %>% data.frame() %>% dplyr::select(candleDateTime, 
         code, openingPrice, highPrice, lowPrice, tradePrice) %>% lapply(unlist) %>% dplyr::bind_cols() %>% 
         dplyr::transmute(index = toupper(gsub("IDX\\.UPBIT\\.", "", code)), date = lubridate::ymd(lubridate::ymd_hms(candleDateTime)), 
             open = openingPrice, high = highPrice, low = lowPrice, close = tradePrice)
  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: httr::content(.)
  11: parse_auto(raw, type, encoding, ...)
  12: parser(x = content, type = type, encoding = encoding, ...)
  13: need_package("xml2")
  14: stop("Please install ", pkg, " package", call. = FALSE)
  
  -- 10. Error: date check to (@test-ubci_index.R#36)  ---------------------------
  Please install xml2 package
  1: head(ubci_index("UBAI", to = Sys.Date() - 2), 1) at testthat/test-ubci_index.R:36
  2: ubci_index("UBAI", to = Sys.Date() - 2)
  3: httr::GET(tar) %>% httr::content() %>% do.call(rbind, .) %>% data.frame() %>% dplyr::select(candleDateTime, 
         code, openingPrice, highPrice, lowPrice, tradePrice) %>% lapply(unlist) %>% dplyr::bind_cols() %>% 
         dplyr::transmute(index = toupper(gsub("IDX\\.UPBIT\\.", "", code)), date = lubridate::ymd(lubridate::ymd_hms(candleDateTime)), 
             open = openingPrice, high = highPrice, low = lowPrice, close = tradePrice)
  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: httr::content(.)
  11: parse_auto(raw, type, encoding, ...)
  12: parser(x = content, type = type, encoding = encoding, ...)
  13: need_package("xml2")
  14: stop("Please install ", pkg, " package", call. = FALSE)
  
  == testthat results  ===========================================================
  [ OK: 6 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 10 ]
  1.  Error: colume check (@test-ubci_get.R#4) 
  2.  Error: code check (@test-ubci_get.R#11) 
  3.  Error: date check from (@test-ubci_get.R#17) 
  4.  Error: date check to (@test-ubci_get.R#22) 
  5.  Error: colume check (@test-ubci_index.R#4) 
  6.  Error: index check 1 (@test-ubci_index.R#11) 
  7.  Error: index check 2 (@test-ubci_index.R#18) 
  8.  Error: index check 3 (@test-ubci_index.R#25) 
  9.  Error: date check from (@test-ubci_index.R#31) 
  10. Error: date check to (@test-ubci_index.R#36) 
  
  Error: testthat unit tests failed
  Execution halted