Running 'testthat.R' [131s/163s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(portalr)
  > 
  > test_check("portalr")
  -- 1. Error: (unknown) (@test-04-weather.R#4)  ---------------------------------
  'where' must be an environment
  Backtrace:
    1. portalr::weather("daily", path = portal_data_path)
    2. dplyr::mutate(...)
    9. tidyr::complete(...)
   11. tidyr::replace_na(full, replace = fill)
   12. ellipsis::check_dots_used()
   14. ellipsis:::exit_handler(action)
   15. base::bquote(...)
  
  -- 2. Error: plant_abundance returns expected results (@test-06-summarize-plants
  'where' must be an environment
  Backtrace:
    1. portalr::plant_abundance(...)
    5. portalr::summarize_plant_data(..., shape = "flat", output = "abundance")
    3. portalr::clean_plant_data(data_tables, type, unknowns, correct_sp)
   10. portalr:::make_plant_plot_data(...)
    5. dplyr::group_by(., !!!grouping)
    5. dplyr::summarize(., n = sum(!!wt, na.rm = TRUE))
    5. dplyr::ungroup(.)
    5. dplyr::right_join(...)
   13. tidyr::complete(., !!!grouping, fill = filler)
   24. tidyr::replace_na(full, replace = fill)
   25. ellipsis::check_dots_used()
   27. ellipsis:::exit_handler(action)
   28. base::bquote(...)
  
  -- 3. Error: (unknown) (@test-07-seasons.R#4)  ---------------------------------
  'where' must be an environment
  Backtrace:
    1. portalr::abundance(path = portal_data_path, level = "plot", shape = "flat")
    2. portalr::summarize_rodent_data(..., output = "abundance")
    3. portalr::clean_rodent_data(...)
   10. portalr:::make_plot_data(., trapping_data, output, min_traps)
    5. dplyr::count(., !!!grouping, wt = !!wt)
   12. tidyr::complete(., !!!grouping, fill = filler)
   20. tidyr::replace_na(full, replace = fill)
   21. ellipsis::check_dots_used()
   23. ellipsis:::exit_handler(action)
   24. base::bquote(...)
  
  -- 4. Error: colony_presence_absence returns expected results (@test-10-summariz
  'where' must be an environment
  Backtrace:
    1. portalr::colony_presence_absence(...)
    2. portalr:::compute_presence(colonydat, level)
    3. dplyr::select(., !!!grouping)
    3. dplyr::distinct(.)
    3. dplyr::mutate(., presence = 1)
   11. tidyr::complete(., !!!grouping, fill = list(presence = 0))
   13. tidyr::replace_na(full, replace = fill)
   14. ellipsis::check_dots_used()
   16. ellipsis:::exit_handler(action)
   17. base::bquote(...)
  
  -- 5. Error: bait_presence_absence returns expected results (@test-10-summarize_
  'where' must be an environment
  Backtrace:
    1. portalr::bait_presence_absence(path = portal_data_path, level = "Stake")
    5. portalr:::compute_presence(bait, level)
    3. dplyr::select(., !!!grouping)
    3. dplyr::distinct(.)
    3. dplyr::mutate(., presence = 1)
   11. tidyr::complete(., !!!grouping, fill = list(presence = 0))
   16. tidyr::replace_na(full, replace = fill)
   17. ellipsis::check_dots_used()
   19. ellipsis:::exit_handler(action)
   20. base::bquote(...)
  
  -- 6. Error: colony_presence_absence returns expected results (@test-10-summariz
  'where' must be an environment
  Backtrace:
    1. portalr::colony_presence_absence(...)
    2. portalr:::compute_presence(colonydat, level)
    3. dplyr::select(., !!!grouping)
    3. dplyr::distinct(.)
    3. dplyr::mutate(., presence = 1)
   11. tidyr::complete(., !!!grouping, fill = list(presence = 0))
   13. tidyr::replace_na(full, replace = fill)
   14. ellipsis::check_dots_used()
   16. ellipsis:::exit_handler(action)
   17. base::bquote(...)
  
  -- 7. Error: bait_presence_absence returns expected results (@test-10-summarize_
  'where' must be an environment
  Backtrace:
    1. portalr::bait_presence_absence(path = portal_data_path, level = "plot")
    5. portalr:::compute_presence(bait, level)
    3. dplyr::select(., !!!grouping)
    3. dplyr::distinct(.)
    3. dplyr::mutate(., presence = 1)
   11. tidyr::complete(., !!!grouping, fill = list(presence = 0))
   16. tidyr::replace_na(full, replace = fill)
   17. ellipsis::check_dots_used()
   19. ellipsis:::exit_handler(action)
   20. base::bquote(...)
  
  -- 8. Error: data generated by default setting is same  ------------------------
  'where' must be an environment
  Backtrace:
    1. portalr::abundance(...)
    2. portalr::summarize_rodent_data(..., output = "abundance")
    3. portalr::clean_rodent_data(...)
   10. portalr:::make_plot_data(., trapping_data, output, min_traps)
    5. dplyr::count(., !!!grouping, wt = !!wt)
   12. tidyr::complete(., !!!grouping, fill = filler)
   20. tidyr::replace_na(full, replace = fill)
   21. ellipsis::check_dots_used()
   23. ellipsis:::exit_handler(action)
   24. base::bquote(...)
  
  -- 9. Error: data generated by level = treatment, plots = longterm is same  ----
  'where' must be an environment
  Backtrace:
    1. portalr::abundance(portal_data_path, level = "treatment", plots = "longterm")
    2. portalr::summarize_rodent_data(..., output = "abundance")
    3. portalr::clean_rodent_data(...)
   10. portalr:::make_plot_data(., trapping_data, output, min_traps)
    5. dplyr::count(., !!!grouping, wt = !!wt)
   12. tidyr::complete(., !!!grouping, fill = filler)
   20. tidyr::replace_na(full, replace = fill)
   21. ellipsis::check_dots_used()
   23. ellipsis:::exit_handler(action)
   24. base::bquote(...)
  
  -- 10. Error: data generated by level = plot, time = newmoon, type = granivore, 
  'where' must be an environment
  Backtrace:
    1. portalr::abundance(...)
    2. portalr::summarize_rodent_data(..., output = "abundance")
    3. portalr::clean_rodent_data(...)
   10. portalr:::make_plot_data(., trapping_data, output, min_traps)
    5. dplyr::count(., !!!grouping, wt = !!wt)
   12. tidyr::complete(., !!!grouping, fill = filler)
   20. tidyr::replace_na(full, replace = fill)
   21. ellipsis::check_dots_used()
   23. ellipsis:::exit_handler(action)
   24. base::bquote(...)
  
  -- 11. Error: data generated by na_drop = FALSE, zero_drop = FALSE is same  ----
  'where' must be an environment
  Backtrace:
    1. portalr::abundance(...)
    2. portalr::summarize_rodent_data(..., output = "abundance")
    3. portalr::clean_rodent_data(...)
   10. portalr:::make_plot_data(., trapping_data, output, min_traps)
    5. dplyr::count(., !!!grouping, wt = !!wt)
   12. tidyr::complete(., !!!grouping, fill = filler)
   20. tidyr::replace_na(full, replace = fill)
   21. ellipsis::check_dots_used()
   23. ellipsis:::exit_handler(action)
   24. base::bquote(...)
  
  -- 12. Error: data generated by unknowns = T, min_plots = 1 is same  -----------
  'where' must be an environment
  Backtrace:
    1. portalr::abundance(portal_data_path, min_plots = 1, unknowns = TRUE)
    2. portalr::summarize_rodent_data(..., output = "abundance")
    3. portalr::clean_rodent_data(...)
   10. portalr:::make_plot_data(., trapping_data, output, min_traps)
    5. dplyr::count(., !!!grouping, wt = !!wt)
   12. tidyr::complete(., !!!grouping, fill = filler)
   20. tidyr::replace_na(full, replace = fill)
   21. ellipsis::check_dots_used()
   23. ellipsis:::exit_handler(action)
   24. base::bquote(...)
  
  -- 13. Error: data generated by plots = c(4, 8, 10, 12) is same  ---------------
  'where' must be an environment
  Backtrace:
    1. portalr::summarize_rodent_data(...)
    2. portalr::clean_rodent_data(...)
    9. portalr:::make_plot_data(., trapping_data, output, min_traps)
    4. dplyr::count(., !!!grouping, wt = !!wt)
   11. tidyr::complete(., !!!grouping, fill = filler)
   19. tidyr::replace_na(full, replace = fill)
   20. ellipsis::check_dots_used()
   22. ellipsis:::exit_handler(action)
   23. base::bquote(...)
  
  -- 14. Error: biomass data generated by level = plot is same  ------------------
  'where' must be an environment
  Backtrace:
    1. portalr::biomass(...)
    2. portalr::summarize_rodent_data(..., output = "biomass")
    3. portalr::clean_rodent_data(...)
   10. portalr:::make_plot_data(., trapping_data, output, min_traps)
    5. dplyr::count(., !!!grouping, wt = !!wt)
   12. tidyr::complete(., !!!grouping, fill = filler)
   20. tidyr::replace_na(full, replace = fill)
   21. ellipsis::check_dots_used()
   23. ellipsis:::exit_handler(action)
   24. base::bquote(...)
  
  -- 15. Error: biomass data generated by min_plots = 1 is same  -----------------
  'where' must be an environment
  Backtrace:
    1. portalr::biomass(portal_data_path, type = "rodents", min_plots = 1)
    2. portalr::summarize_rodent_data(..., output = "biomass")
    3. portalr::clean_rodent_data(...)
   10. portalr:::make_plot_data(., trapping_data, output, min_traps)
    5. dplyr::count(., !!!grouping, wt = !!wt)
   12. tidyr::complete(., !!!grouping, fill = filler)
   20. tidyr::replace_na(full, replace = fill)
   21. ellipsis::check_dots_used()
   23. ellipsis:::exit_handler(action)
   24. base::bquote(...)
  
  -- 16. Error: data generated by default setting is same (plants)  --------------
  'where' must be an environment
  Backtrace:
    1. portalr::plant_abundance(...)
    5. portalr::summarize_plant_data(..., shape = "flat", output = "abundance")
    3. portalr::clean_plant_data(data_tables, type, unknowns, correct_sp)
   10. portalr:::make_plant_plot_data(...)
    5. dplyr::group_by(., !!!grouping)
    5. dplyr::summarize(., n = sum(!!wt, na.rm = TRUE))
    5. dplyr::ungroup(.)
    5. dplyr::right_join(...)
   13. tidyr::complete(., !!!grouping, fill = filler)
   24. tidyr::replace_na(full, replace = fill)
   25. ellipsis::check_dots_used()
   27. ellipsis:::exit_handler(action)
   28. base::bquote(...)
  
  -- 17. Error: data generated by type = Shrubs, unknowns = T, correct_sp = F is s
  'where' must be an environment
  Backtrace:
    1. portalr::plant_abundance(...)
    5. portalr::summarize_plant_data(..., shape = "flat", output = "abundance")
    3. portalr::clean_plant_data(data_tables, type, unknowns, correct_sp)
   10. portalr:::make_plant_plot_data(...)
    5. dplyr::group_by(., !!!grouping)
    5. dplyr::summarize(., n = sum(!!wt, na.rm = TRUE))
    5. dplyr::ungroup(.)
    5. dplyr::right_join(...)
   13. tidyr::complete(., !!!grouping, fill = filler)
   24. tidyr::replace_na(full, replace = fill)
   25. ellipsis::check_dots_used()
   27. ellipsis:::exit_handler(action)
   28. base::bquote(...)
  
  -- 18. Error: data generated by level = Plot, type = Annuals, plots = longterm i
  'where' must be an environment
  Backtrace:
    1. portalr::plant_abundance(...)
    5. portalr::summarize_plant_data(..., shape = "flat", output = "abundance")
    3. portalr::clean_plant_data(data_tables, type, unknowns, correct_sp)
   10. portalr:::make_plant_plot_data(...)
    5. dplyr::group_by(., !!!grouping)
    5. dplyr::summarize(., n = sum(!!wt, na.rm = TRUE))
    5. dplyr::ungroup(.)
    5. dplyr::right_join(...)
   13. tidyr::complete(., !!!grouping, fill = filler)
   24. tidyr::replace_na(full, replace = fill)
   25. ellipsis::check_dots_used()
   27. ellipsis:::exit_handler(action)
   28. base::bquote(...)
  
  -- 19. Error: data generated by shape = crosstab is same (plants)  -------------
  'where' must be an environment
  Backtrace:
    1. portalr::plant_abundance(portal_data_path, shape = "crosstab")
    2. portalr::summarize_plant_data(..., shape = "crosstab", output = "abundance")
    3. portalr::clean_plant_data(data_tables, type, unknowns, correct_sp)
   10. portalr:::make_plant_plot_data(...)
    5. dplyr::group_by(., !!!grouping)
    5. dplyr::summarize(., n = sum(!!wt, na.rm = TRUE))
    5. dplyr::ungroup(.)
    5. dplyr::right_join(...)
   13. tidyr::complete(., !!!grouping, fill = filler)
   21. tidyr::replace_na(full, replace = fill)
   22. ellipsis::check_dots_used()
   24. ellipsis:::exit_handler(action)
   25. base::bquote(...)
  
  -- 20. Error: data generated by default setting is same (ant colony_presence_abs
  'where' must be an environment
  Backtrace:
    1. portalr::colony_presence_absence(portal_data_path, level = "site")
    2. portalr:::compute_presence(colonydat, level)
    3. dplyr::select(., !!!grouping)
    3. dplyr::distinct(.)
    3. dplyr::mutate(., presence = 1)
   11. tidyr::complete(., !!!grouping, fill = list(presence = 0))
   13. tidyr::replace_na(full, replace = fill)
   14. ellipsis::check_dots_used()
   16. ellipsis:::exit_handler(action)
   17. base::bquote(...)
  
  -- 21. Error: data generated by default setting is same (ant bait_presence_absen
  'where' must be an environment
  Backtrace:
    1. portalr::bait_presence_absence(portal_data_path, level = "Site")
    5. portalr:::compute_presence(bait, level)
    3. dplyr::select(., !!!grouping)
    3. dplyr::distinct(.)
    3. dplyr::mutate(., presence = 1)
   11. tidyr::complete(., !!!grouping, fill = list(presence = 0))
   16. tidyr::replace_na(full, replace = fill)
   17. ellipsis::check_dots_used()
   19. ellipsis:::exit_handler(action)
   20. base::bquote(...)
  
  -- 22. Error: data generated by level = 'stake' is same (ant colony_presence_abs
  'where' must be an environment
  Backtrace:
    1. portalr::colony_presence_absence(portal_data_path, level = "stake")
    2. portalr:::compute_presence(colonydat, level)
    3. dplyr::select(., !!!grouping)
    3. dplyr::distinct(.)
    3. dplyr::mutate(., presence = 1)
   11. tidyr::complete(., !!!grouping, fill = list(presence = 0))
   13. tidyr::replace_na(full, replace = fill)
   14. ellipsis::check_dots_used()
   16. ellipsis:::exit_handler(action)
   17. base::bquote(...)
  
  -- 23. Error: data generated by level = 'stake' is same (ant bait_presence_absen
  'where' must be an environment
  Backtrace:
    1. portalr::bait_presence_absence(portal_data_path, level = "stake")
    5. portalr:::compute_presence(bait, level)
    3. dplyr::select(., !!!grouping)
    3. dplyr::distinct(.)
    3. dplyr::mutate(., presence = 1)
   11. tidyr::complete(., !!!grouping, fill = list(presence = 0))
   16. tidyr::replace_na(full, replace = fill)
   17. ellipsis::check_dots_used()
   19. ellipsis:::exit_handler(action)
   20. base::bquote(...)
  
  -- 24. Error: data generated by level = 'plot' is same (ant colony_presence_abse
  'where' must be an environment
  Backtrace:
    1. portalr::colony_presence_absence(portal_data_path, level = "plot")
    2. portalr:::compute_presence(colonydat, level)
    3. dplyr::select(., !!!grouping)
    3. dplyr::distinct(.)
    3. dplyr::mutate(., presence = 1)
   11. tidyr::complete(., !!!grouping, fill = list(presence = 0))
   13. tidyr::replace_na(full, replace = fill)
   14. ellipsis::check_dots_used()
   16. ellipsis:::exit_handler(action)
   17. base::bquote(...)
  
  -- 25. Error: data generated by level = 'plot' is same (ant bait_presence_absenc
  'where' must be an environment
  Backtrace:
    1. portalr::bait_presence_absence(portal_data_path, level = "plot")
    5. portalr:::compute_presence(bait, level)
    3. dplyr::select(., !!!grouping)
    3. dplyr::distinct(.)
    3. dplyr::mutate(., presence = 1)
   11. tidyr::complete(., !!!grouping, fill = list(presence = 0))
   16. tidyr::replace_na(full, replace = fill)
   17. ellipsis::check_dots_used()
   19. ellipsis:::exit_handler(action)
   20. base::bquote(...)
  
  -- 26. Error: data generated by default setting is same (weather)  -------------
  'where' must be an environment
  Backtrace:
    1. portalr::weather(path = portal_data_path)
    2. dplyr::mutate(...)
    9. tidyr::complete(...)
   11. tidyr::replace_na(full, replace = fill)
   12. ellipsis::check_dots_used()
   14. ellipsis:::exit_handler(action)
   15. base::bquote(...)
  
  -- 27. Error: data generated by fill = TRUE is same (weather)  -----------------
  'where' must be an environment
  Backtrace:
    1. portalr::weather(fill = TRUE, path = portal_data_path)
    2. dplyr::mutate(...)
    9. tidyr::complete(...)
   11. tidyr::replace_na(full, replace = fill)
   12. ellipsis::check_dots_used()
   14. ellipsis:::exit_handler(action)
   15. base::bquote(...)
  
  -- 28. Error: seasonal summaries generated by default setting is same  ---------
  'where' must be an environment
  Backtrace:
    1. portalr::abundance(...)
    2. portalr::summarize_rodent_data(..., output = "abundance")
    3. portalr::clean_rodent_data(...)
   10. portalr:::make_plot_data(., trapping_data, output, min_traps)
    5. dplyr::count(., !!!grouping, wt = !!wt)
   12. tidyr::complete(., !!!grouping, fill = filler)
   20. tidyr::replace_na(full, replace = fill)
   21. ellipsis::check_dots_used()
   23. ellipsis:::exit_handler(action)
   24. base::bquote(...)
  
  == testthat results  ===========================================================
  [ OK: 118 | SKIPPED: 10 | WARNINGS: 0 | FAILED: 28 ]
  1. Error: (unknown) (@test-04-weather.R#4) 
  2. Error: plant_abundance returns expected results (@test-06-summarize-plants.R#6) 
  3. Error: (unknown) (@test-07-seasons.R#4) 
  4. Error: colony_presence_absence returns expected results (@test-10-summarize_ants.R#6) 
  5. Error: bait_presence_absence returns expected results (@test-10-summarize_ants.R#20) 
  6. Error: colony_presence_absence returns expected results (@test-10-summarize_ants.R#33) 
  7. Error: bait_presence_absence returns expected results (@test-10-summarize_ants.R#48) 
  8. Error: data generated by default setting is same 
  9. Error: data generated by level = treatment, plots = longterm is same 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted