Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(birdnik)
  Loading required package: httr
  > 
  > test_check("birdnik")
  ── 1. Error: bigram retrieval works (@test_birdnik.R#44)  ──────────────────────
  Too Many Requests (RFC 6585) (HTTP 429).
  1: word_bigrams(key = key, words = c("cat", "dog")) at testthat/test_birdnik.R:44
  2: do.call("rbind", mapply(function(param, word, key, ...) {
         result <- query(key, param, ...)
         if (!length(result)) {
             return(data.frame(word = word, first_gram = NA, second_gram = NA, mi = NA, 
                 wlmi = NA, stringsAsFactors = FALSE))
         }
         result <- unlist(result)
         return(data.frame(word = word, first_gram = unname(result[names(result) == "gram1"]), 
             second_gram = unname(result[names(result) == "gram2"]), mi = as.numeric(unname(result[names(result) == 
                 "mi"])), wlmi = as.numeric(unname(result[names(result) == "wlmi"])), 
             stringsAsFactors = FALSE))
     }, param = param, word = words, key = key, ..., SIMPLIFY = FALSE, USE.NAMES = FALSE))
  3: mapply(function(param, word, key, ...) {
         result <- query(key, param, ...)
         if (!length(result)) {
             return(data.frame(word = word, first_gram = NA, second_gram = NA, mi = NA, 
                 wlmi = NA, stringsAsFactors = FALSE))
         }
         result <- unlist(result)
         return(data.frame(word = word, first_gram = unname(result[names(result) == "gram1"]), 
             second_gram = unname(result[names(result) == "gram2"]), mi = as.numeric(unname(result[names(result) == 
                 "mi"])), wlmi = as.numeric(unname(result[names(result) == "wlmi"])), 
             stringsAsFactors = FALSE))
     }, param = param, word = words, key = key, ..., SIMPLIFY = FALSE, USE.NAMES = FALSE)
  4: (function (param, word, key, ...) 
     {
         result <- query(key, param, ...)
         if (!length(result)) {
             return(data.frame(word = word, first_gram = NA, second_gram = NA, mi = NA, 
                 wlmi = NA, stringsAsFactors = FALSE))
         }
         result <- unlist(result)
         return(data.frame(word = word, first_gram = unname(result[names(result) == "gram1"]), 
             second_gram = unname(result[names(result) == "gram2"]), mi = as.numeric(unname(result[names(result) == 
                 "mi"])), wlmi = as.numeric(unname(result[names(result) == "wlmi"])), 
             stringsAsFactors = FALSE))
     })(param = dots[[1L]][[1L]], word = dots[[2L]][[1L]], key = dots[[3L]][[1L]])
  5: query(key, param, ...)
  6: httr::stop_for_status(result)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 16 SKIPPED: 0 FAILED: 1
  1. Error: bigram retrieval works (@test_birdnik.R#44) 
  
  Error: testthat unit tests failed
  Execution halted