Last updated on 2025-02-07 08:52:01 CET.
Package | ERROR | OK |
---|---|---|
portalr | 1 | 12 |
Current CRAN status: ERROR: 1, OK: 12
Version: 0.4.3
Check: tests
Result: ERROR
Running 'testthat.R' [34s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(portalr)
>
> test_check("portalr")
[ FAIL 12 | WARN 42 | SKIP 44 | PASS 11 ]
══ Skipped tests (44) ══════════════════════════════════════════════════════════
• On CRAN (43): 'test-01-data-retrieval.R:5:5',
'test-01-data-retrieval.R:41:5', 'test-01-data-retrieval.R:48:5',
'test-01-data-retrieval.R:63:5', 'test-01-data-retrieval.R:78:5',
'test-01-data-retrieval.R:99:5', 'test-03-summarize-rodents.R:6:3',
'test-03-summarize-rodents.R:32:3', 'test-03-summarize-rodents.R:38:3',
'test-03-summarize-rodents.R:60:3', 'test-03-summarize-rodents.R:85:3',
'test-03-summarize-rodents.R:110:3', 'test-03-summarize-rodents.R:129:3',
'test-03-summarize-rodents.R:195:3', 'test-99-regression.R:8:3',
'test-99-regression.R:18:3', 'test-99-regression.R:26:3',
'test-99-regression.R:44:3', 'test-99-regression.R:68:3',
'test-99-regression.R:78:3', 'test-99-regression.R:87:3',
'test-99-regression.R:100:3', 'test-99-regression.R:109:3',
'test-99-regression.R:118:3', 'test-99-regression.R:130:3',
'test-99-regression.R:141:3', 'test-99-regression.R:153:3',
'test-99-regression.R:162:3', 'test-99-regression.R:171:3',
'test-99-regression.R:181:3', 'test-99-regression.R:195:3',
'test-99-regression.R:207:3', 'test-99-regression.R:215:3',
'test-99-regression.R:227:3', 'test-99-regression.R:235:3',
'test-99-regression.R:247:3', 'test-99-regression.R:255:3',
'test-99-regression.R:267:3', 'test-99-regression.R:280:3',
'test-99-regression.R:290:3', 'test-99-regression.R:300:3',
'test-99-regression.R:318:3', 'test-99-regression.R:330:3'
• is.null(newmoon_pheno) is TRUE (1): 'test-11-phenocam.R:27:3'
══ 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:1
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:1
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:3
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:3
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:3
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:1
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 `UseMethod("filter")`: no applicable method for 'filter' applied to an object of class "c('simpleWarning', 'warning', 'condition')"
Backtrace:
▆
1. ├─portalr::ndvi("monthly", path = portal_data_path) at test-08-NDVI.R:4:1
2. │ └─... %>% dplyr::filter(.data$sensor %in% filtering)
3. └─dplyr::filter(., .data$sensor %in% filtering)
── 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:3
2. │ └─portalr:::clean_data(newmoons_table, trapping_table, by = "period")
3. │ └─... %>% unique()
4. ├─base::unique(.)
5. ├─dplyr::select(., dplyr::all_of(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:3
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:3
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:3
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:3
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 42 | SKIP 44 | PASS 11 ]
Error: Test failures
Execution halted
Flavor: r-release-windows-x86_64