Running 'testthat.R' [26m]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(portalr)
  > 
  > test_check("portalr")
  [ FAIL 12 | WARN 43 | SKIP 43 | PASS 20 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (42)
  • is.null(newmoon_pheno) is TRUE (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-02-data-processing.R:8:1'): (code run outside of `test_that()`) ──
  Error in `UseMethod("rename")`: no applicable method for 'rename' applied to an object of class "c('simpleWarning', 'warning', 'condition')"
  Backtrace:
      ▆
   1. └─portalr::load_rodent_data(portal_data_path) at test-02-data-processing.R:8:0
   2.   └─dplyr::rename(species_table, species = "speciescode")
  ── Error ('test-04-weather.R:4:1'): (code run outside of `test_that()`) ────────
  Error in `UseMethod("select")`: no applicable method for 'select' applied to an object of class "c('simpleWarning', 'warning', 'condition')"
  Backtrace:
      ▆
   1. ├─portalr::weather("daily", path = portal_data_path) at test-04-weather.R:4:0
   2. │ └─... %>% ...
   3. └─dplyr::select(...)
  ── Error ('test-05-individual-stake-data.R:6:3'): summarize_individual_rodents returns expected columns ──
  Error in `UseMethod("rename")`: no applicable method for 'rename' applied to an object of class "c('simpleWarning', 'warning', 'condition')"
  Backtrace:
      ▆
   1. └─portalr::summarize_individual_rodents(path = portal_data_path) at test-05-individual-stake-data.R:6:2
   2.   └─portalr::load_rodent_data(...)
   3.     └─dplyr::rename(species_table, species = "speciescode")
  ── Error ('test-06-summarize-plants.R:10:3'): plant_abundance returns expected results ──
  Error in `UseMethod("rename")`: no applicable method for 'rename' applied to an object of class "c('simpleWarning', 'warning', 'condition')"
  Backtrace:
      ▆
   1. ├─portalr::plant_abundance(...) at test-06-summarize-plants.R:10:2
   2. │ ├─... %>% dplyr::filter(.data$abundance > 0)
   3. │ └─portalr::summarize_plant_data(..., shape = "flat", output = "abundance")
   4. │   └─portalr::load_plant_data(...)
   5. │     └─portalr:::reformat_species_table(species_table)
   6. │       └─dplyr::rename(species_table, sp = "species", species = "speciescode")
   7. └─dplyr::filter(., .data$abundance > 0)
  ── Error ('test-06-summarize-plants.R:31:3'): shrub_cover returns expected results ──
  Error in `UseMethod("rename")`: no applicable method for 'rename' applied to an object of class "c('simpleWarning', 'warning', 'condition')"
  Backtrace:
      ▆
   1. └─portalr::shrub_cover(...) at test-06-summarize-plants.R:31:2
   2.   └─portalr::load_plant_data(...)
   3.     └─portalr:::reformat_species_table(species_table)
   4.       └─dplyr::rename(species_table, sp = "species", species = "speciescode")
  ── Error ('test-07-seasons.R:8:1'): (code run outside of `test_that()`) ────────
  Error in `UseMethod("rename")`: no applicable method for 'rename' applied to an object of class "c('simpleWarning', 'warning', 'condition')"
  Backtrace:
      ▆
   1. └─portalr::abundance(path = portal_data_path, level = "plot", shape = "flat") at test-07-seasons.R:8:0
   2.   └─portalr::summarize_rodent_data(..., output = "abundance")
   3.     └─portalr::load_rodent_data(...)
   4.       └─dplyr::rename(species_table, species = "speciescode")
  ── Error ('test-08-NDVI.R:4:1'): (code run outside of `test_that()`) ───────────
  Error in `as.POSIXlt.character(x, tz = tz(x))`: character string is not in a standard unambiguous format
  Backtrace:
      ▆
   1. └─portalr::ndvi("monthly", path = portal_data_path) at test-08-NDVI.R:4:0
   2.   ├─lubridate::month(paste0(NDVI$date, "-01"))
   3.   └─lubridate:::month.default(paste0(NDVI$date, "-01"))
   4.     ├─lubridate::month(...)
   5.     ├─base::as.POSIXlt(x, tz = tz(x))
   6.     └─base::as.POSIXlt.character(x, tz = tz(x))
  ── Error ('test-09-get-future-moons.R:6:3'): get_future_newmoons returns expected results using current newmoons_table ──
  Error in `UseMethod("left_join")`: no applicable method for 'left_join' applied to an object of class "c('simpleWarning', 'warning', 'condition')"
  Backtrace:
      ▆
   1. ├─portalr::load_trapping_data(portal_data_path) at test-09-get-future-moons.R:6:2
   2. │ └─portalr:::clean_data(newmoons_table, trapping_table, by = "period")
   3. │   └─... %>% unique()
   4. ├─base::unique(.)
   5. ├─dplyr::select(., columns_to_keep)
   6. ├─dplyr::filter(., .data$qcflag == 1)
   7. └─dplyr::left_join(., trapping_table, ...)
  ── Error ('test-10-summarize_ants.R:6:3'): colony_presence_absence returns expected results ──
  Error in `UseMethod("rename")`: no applicable method for 'rename' applied to an object of class "c('simpleWarning', 'warning', 'condition')"
  Backtrace:
      ▆
   1. └─portalr::colony_presence_absence(...) at test-10-summarize_ants.R:6:2
   2.   └─portalr:::reformat_species_table(antsp)
   3.     └─dplyr::rename(species_table, sp = "species", species = "speciescode")
  ── Error ('test-10-summarize_ants.R:21:3'): bait_presence_absence returns expected results ──
  Error in `UseMethod("select")`: no applicable method for 'select' applied to an object of class "c('simpleWarning', 'warning', 'condition')"
  Backtrace:
      ▆
   1. ├─portalr::bait_presence_absence(path = portal_data_path, level = "Stake") at test-10-summarize_ants.R:21:2
   2. │ ├─compute_presence(bait, level) %>% as.data.frame()
   3. │ └─portalr:::compute_presence(bait, level)
   4. │   └─... %>% ...
   5. ├─base::as.data.frame(.)
   6. ├─tidyr::complete(., !!!grouping, fill = list(presence = 0))
   7. ├─dplyr::mutate(., presence = 1)
   8. ├─dplyr::distinct(.)
   9. └─dplyr::select(., dplyr::all_of(vars_to_keep))
  ── Error ('test-10-summarize_ants.R:34:3'): colony_presence_absence returns expected results ──
  Error in `UseMethod("rename")`: no applicable method for 'rename' applied to an object of class "c('simpleWarning', 'warning', 'condition')"
  Backtrace:
      ▆
   1. └─portalr::colony_presence_absence(...) at test-10-summarize_ants.R:34:2
   2.   └─portalr:::reformat_species_table(antsp)
   3.     └─dplyr::rename(species_table, sp = "species", species = "speciescode")
  ── Error ('test-10-summarize_ants.R:49:3'): bait_presence_absence returns expected results ──
  Error in `UseMethod("select")`: no applicable method for 'select' applied to an object of class "c('simpleWarning', 'warning', 'condition')"
  Backtrace:
      ▆
   1. ├─portalr::bait_presence_absence(path = portal_data_path, level = "plot") at test-10-summarize_ants.R:49:2
   2. │ ├─compute_presence(bait, level) %>% as.data.frame()
   3. │ └─portalr:::compute_presence(bait, level)
   4. │   └─... %>% ...
   5. ├─base::as.data.frame(.)
   6. ├─tidyr::complete(., !!!grouping, fill = list(presence = 0))
   7. ├─dplyr::mutate(., presence = 1)
   8. ├─dplyr::distinct(.)
   9. └─dplyr::select(., dplyr::all_of(vars_to_keep))
  
  [ FAIL 12 | WARN 43 | SKIP 43 | PASS 20 ]
  Error: Test failures
  Execution halted