R Under development (unstable) (2024-11-27 r87386 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(testthat) > library(bdc) > > test_check("bdc") bdc_basisOfRecords_notStandard: Flagged 4 of the following specific nature: c("FOSSIL_SPECIMEN", NA, "Specimen", "PRESERVED_SPECIMEN") One column was added to the database. bdc_basisOfRecords_notStandard: Flagged 2 of the following specific nature: c("FOSSIL_SPECIMEN", "RON") One column was added to the database. Loading required package: rnaturalearth Spherical geometry (s2) switched off The rnaturalearthhires package needs to be installed. Installing the rnaturalearthhires package. bdc_coordinates_empty: Flagged 4 records. One column was added to the database. bdc_coordinates_empty: Flagged 4 records. One column was added to the database. bdc_coordinates_empty: Flagged 4 records. One column was added to the database. bdc_coordinates_from_locality Found 3 records missing or with invalid coordinates but with potentially useful information on locality. bdc_coordinates_outOfRange: Flagged 2 records. One column was added to the database. bdc_coordinates_precision: Flagged 4 records One column was added to the database. bdc_coordinates_precision: Flagged 0 records One column was added to the database. Loading required package: readr Attaching package: 'readr' The following objects are masked from 'package:testthat': edition_get, local_edition Loading required package: rnaturalearthdata Attaching package: 'rnaturalearthdata' The following object is masked from 'package:rnaturalearth': countries110 The rnaturalearthhires package needs to be installed. Installing the rnaturalearthhires package. bdc_scientificName_empty: Flagged 5 records. One column was added to the database. bdc_coordinates_empty: Flagged 44 records. One column was added to the database. bdc_coordinates_outOfRange: Flagged 1 records. One column was added to the database. bdc_basisOfRecords_notStandard: Flagged 0 of the following specific nature: character(0) One column was added to the database. The rnaturalearthhires package needs to be installed. Installing the rnaturalearthhires package. Loading auxiliary data: country names Standardizing country names country found: Bolivia country found: Brazil bdc_country_standardized: The country names of 3 records were standardized. Two columns ('country_suggested' and 'countryCode') were added to the database. The rnaturalearthhires package needs to be installed. Installing the rnaturalearthhires package. The rnaturalearthhires package needs to be installed. Installing the rnaturalearthhires package. The rnaturalearthhires package needs to be installed. Installing the rnaturalearthhires package. The rnaturalearthhires package needs to be installed. Installing the rnaturalearthhires package. The rnaturalearthhires package needs to be installed. Installing the rnaturalearthhires package. Loading required package: cowplot Loading required package: DT bdc_eventDate_empty: Flagged 3 records. One column was added to the database. bdc_fiter_out_flags: The following columns were removed from the database: .bdc_scientificName_empty, .bdc_coordinates_empty, .bdc_coordinates_outOfRange, .summary bdc_fiter_out_flags: The following columns were removed from the database: .summary The rnaturalearthhires package needs to be installed. Installing the rnaturalearthhires package. bdc_coordinates_empty: Flagged 0 records. One column was added to the database. Loading required package: ggplot2 bdc_scientificName_empty: Flagged 2 records. One column was added to the database. bdc_scientificName_empty: Flagged 2 records. One column was added to the database. The rnaturalearthhires package needs to be installed. Installing the rnaturalearthhires package. Standardizing datafake1 file Standardizing datafake2 file Standardizing datafake3 file Standardizing datafake1 file Standardizing datafake2 file Standardizing datafake3 file [ERROR]: Column names defined in the metadata do not match column names in the datafake4 file [INFO]: Column(s) `y` and `notes` defined in the metadata not present in the datafake4 bdc_summary_col: Flagged 4 records. One column was added to the database. bdc_year_from_eventDate: Four-digit year were extracted from 5 records. bdc_year_outOfRange: Flagged 1 records. One column was added to the database. [ FAIL 12 | WARN 0 | SKIP 5 | PASS 63 ] ══ Skipped tests (5) ═══════════════════════════════════════════════════════════ • On CRAN (5): 'test-bdc_clean_names.R:2:1', 'test-bdc_filter_name.R:2:1', 'test-bdc_query_names_taxadb.R:2:1', 'test-bdc_standardize_datasets.R:180:1', 'test-bdc_suggest_names_taxadb.R:2:1' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-bdc_coordinates_country_inconsistent.R:5:1'): (code run outside of `test_that()`) ── Error in `value[[3L]](cond)`: Failed to install the rnaturalearthhires package. Please try installing the package for yourself using the following command: devtools::install_github("ropensci/rnaturalearthhires") Backtrace: ▆ 1. ├─bdc::bdc_coordinates_country_inconsistent(...) at test-bdc_coordinates_country_inconsistent.R:5:1 2. │ ├─... %>% bdc_reword_countries() 3. │ └─rnaturalearth::ne_countries(...) 4. │ └─rnaturalearth:::get_data(scale = scale, type = type) 5. │ └─rnaturalearth::check_rnaturalearthhires() 6. │ └─rnaturalearth::install_rnaturalearthhires() 7. │ └─base::tryCatch(...) 8. │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 9. │ ├─base (local) tryCatchOne(...) 10. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 11. │ └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) 12. │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13. │ └─value[[3L]](cond) 14. ├─bdc:::bdc_reword_countries(.) 15. │ └─data %>% ... 16. └─dplyr::mutate(., name_long = dplyr::recode(name_long, !!!vec_reword)) ── Error ('test-bdc_coordinates_transposed.R:21:3'): test based on function example dataset ── Error in `value[[3L]](cond)`: Failed to install the rnaturalearthhires package. Please try installing the package for yourself using the following command: devtools::install_github("ropensci/rnaturalearthhires") Backtrace: ▆ 1. ├─bdc::bdc_coordinates_transposed(...) at test-bdc_coordinates_transposed.R:21:3 2. │ └─bdc:::bdc_get_world_map() 3. │ ├─base::suppressWarnings(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ ├─... %>% sf::as_Spatial() 6. │ └─rnaturalearth::ne_countries(scale = "large", returnclass = "sf") 7. │ └─rnaturalearth:::get_data(scale = scale, type = type) 8. │ └─rnaturalearth::check_rnaturalearthhires() 9. │ └─rnaturalearth::install_rnaturalearthhires() 10. │ └─base::tryCatch(...) 11. │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 12. │ ├─base (local) tryCatchOne(...) 13. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 14. │ └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) 15. │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 16. │ └─value[[3L]](cond) 17. ├─sf::as_Spatial(.) 18. ├─dplyr::select(., name_long, iso2c, geometry) 19. ├─dplyr::mutate(...) 20. ├─dplyr::left_join(., cntr_names, by = c(name_long = "english_name")) 21. ├─bdc:::bdc_reword_countries(.) 22. │ └─data %>% ... 23. └─dplyr::mutate(., name_long = dplyr::recode(name_long, !!!vec_reword)) ── Error ('test-bdc_coordinates_transposed.R:92:1'): (code run outside of `test_that()`) ── Error in `value[[3L]](cond)`: Failed to install the rnaturalearthhires package. Please try installing the package for yourself using the following command: devtools::install_github("ropensci/rnaturalearthhires") Backtrace: ▆ 1. ├─bdc::bdc_country_from_coordinates(...) at test-bdc_coordinates_transposed.R:92:1 2. │ ├─... %>% bdc_reword_countries() 3. │ └─rnaturalearth::ne_countries(scale = "large", returnclass = "sf") 4. │ └─rnaturalearth:::get_data(scale = scale, type = type) 5. │ └─rnaturalearth::check_rnaturalearthhires() 6. │ └─rnaturalearth::install_rnaturalearthhires() 7. │ └─base::tryCatch(...) 8. │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 9. │ ├─base (local) tryCatchOne(...) 10. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 11. │ └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) 12. │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13. │ └─value[[3L]](cond) 14. ├─bdc:::bdc_reword_countries(.) 15. │ └─data %>% ... 16. └─dplyr::mutate(., name_long = dplyr::recode(name_long, !!!vec_reword)) ── Error ('test-bdc_correct_coordinates.R:25:1'): (code run outside of `test_that()`) ── Error in `value[[3L]](cond)`: Failed to install the rnaturalearthhires package. Please try installing the package for yourself using the following command: devtools::install_github("ropensci/rnaturalearthhires") Backtrace: ▆ 1. ├─bdc:::bdc_get_world_map() at test-bdc_correct_coordinates.R:25:1 2. │ ├─base::suppressWarnings(...) 3. │ │ └─base::withCallingHandlers(...) 4. │ ├─... %>% sf::as_Spatial() 5. │ └─rnaturalearth::ne_countries(scale = "large", returnclass = "sf") 6. │ └─rnaturalearth:::get_data(scale = scale, type = type) 7. │ └─rnaturalearth::check_rnaturalearthhires() 8. │ └─rnaturalearth::install_rnaturalearthhires() 9. │ └─base::tryCatch(...) 10. │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 11. │ ├─base (local) tryCatchOne(...) 12. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 13. │ └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) 14. │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 15. │ └─value[[3L]](cond) 16. ├─sf::as_Spatial(.) 17. ├─dplyr::select(., name_long, iso2c, geometry) 18. ├─dplyr::mutate(...) 19. ├─dplyr::left_join(., cntr_names, by = c(name_long = "english_name")) 20. ├─bdc:::bdc_reword_countries(.) 21. │ └─data %>% ... 22. └─dplyr::mutate(., name_long = dplyr::recode(name_long, !!!vec_reword)) ── Error ('test-bdc_country_from_coordinates.R:9:3'): it can return country names ── Error in `value[[3L]](cond)`: Failed to install the rnaturalearthhires package. Please try installing the package for yourself using the following command: devtools::install_github("ropensci/rnaturalearthhires") Backtrace: ▆ 1. ├─bdc::bdc_country_from_coordinates(...) at test-bdc_country_from_coordinates.R:9:3 2. │ ├─... %>% bdc_reword_countries() 3. │ └─rnaturalearth::ne_countries(scale = "large", returnclass = "sf") 4. │ └─rnaturalearth:::get_data(scale = scale, type = type) 5. │ └─rnaturalearth::check_rnaturalearthhires() 6. │ └─rnaturalearth::install_rnaturalearthhires() 7. │ └─base::tryCatch(...) 8. │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 9. │ ├─base (local) tryCatchOne(...) 10. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 11. │ └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) 12. │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13. │ └─value[[3L]](cond) 14. ├─bdc:::bdc_reword_countries(.) 15. │ └─data %>% ... 16. └─dplyr::mutate(., name_long = dplyr::recode(name_long, !!!vec_reword)) ── Error ('test-bdc_country_from_coordinates.R:31:3'): return message ────────── Error in `value[[3L]](cond)`: Failed to install the rnaturalearthhires package. Please try installing the package for yourself using the following command: devtools::install_github("ropensci/rnaturalearthhires") Backtrace: ▆ 1. ├─testthat::expect_message(...) at test-bdc_country_from_coordinates.R:31:3 2. │ └─testthat:::expect_condition_matching(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. ├─bdc::bdc_country_from_coordinates(...) 8. │ ├─... %>% bdc_reword_countries() 9. │ └─rnaturalearth::ne_countries(scale = "large", returnclass = "sf") 10. │ └─rnaturalearth:::get_data(scale = scale, type = type) 11. │ └─rnaturalearth::check_rnaturalearthhires() 12. │ └─rnaturalearth::install_rnaturalearthhires() 13. │ └─base::tryCatch(...) 14. │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 15. │ ├─base (local) tryCatchOne(...) 16. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 17. │ └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) 18. │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 19. │ └─value[[3L]](cond) 20. ├─bdc:::bdc_reword_countries(.) 21. │ └─data %>% ... 22. └─dplyr::mutate(., name_long = dplyr::recode(name_long, !!!vec_reword)) ── Error ('test-bdc_country_from_coordinates.R:46:3'): return country names when all contry names is missing ── Error in `value[[3L]](cond)`: Failed to install the rnaturalearthhires package. Please try installing the package for yourself using the following command: devtools::install_github("ropensci/rnaturalearthhires") Backtrace: ▆ 1. ├─testthat::expect_message(...) at test-bdc_country_from_coordinates.R:46:3 2. │ └─testthat:::expect_condition_matching(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. ├─bdc::bdc_country_from_coordinates(...) 8. │ ├─... %>% bdc_reword_countries() 9. │ └─rnaturalearth::ne_countries(scale = "large", returnclass = "sf") 10. │ └─rnaturalearth:::get_data(scale = scale, type = type) 11. │ └─rnaturalearth::check_rnaturalearthhires() 12. │ └─rnaturalearth::install_rnaturalearthhires() 13. │ └─base::tryCatch(...) 14. │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 15. │ ├─base (local) tryCatchOne(...) 16. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 17. │ └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) 18. │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 19. │ └─value[[3L]](cond) 20. ├─bdc:::bdc_reword_countries(.) 21. │ └─data %>% ... 22. └─dplyr::mutate(., name_long = dplyr::recode(name_long, !!!vec_reword)) ── Error ('test-bdc_country_from_coordinates.R:69:1'): (code run outside of `test_that()`) ── Error in `value[[3L]](cond)`: Failed to install the rnaturalearthhires package. Please try installing the package for yourself using the following command: devtools::install_github("ropensci/rnaturalearthhires") Backtrace: ▆ 1. ├─bdc::bdc_country_from_coordinates(data) at test-bdc_country_from_coordinates.R:69:1 2. │ ├─... %>% bdc_reword_countries() 3. │ └─rnaturalearth::ne_countries(scale = "large", returnclass = "sf") 4. │ └─rnaturalearth:::get_data(scale = scale, type = type) 5. │ └─rnaturalearth::check_rnaturalearthhires() 6. │ └─rnaturalearth::install_rnaturalearthhires() 7. │ └─base::tryCatch(...) 8. │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 9. │ ├─base (local) tryCatchOne(...) 10. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 11. │ └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) 12. │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13. │ └─value[[3L]](cond) 14. ├─bdc:::bdc_reword_countries(.) 15. │ └─data %>% ... 16. └─dplyr::mutate(., name_long = dplyr::recode(name_long, !!!vec_reword)) ── Error ('test-bdc_create_dir.R:2:1'): (code run outside of `test_that()`) ──── Error: [ENOENT] Failed to make directory 'D:/RCompile/Output/Check': no such file or directory Backtrace: ▆ 1. └─bdc:::bdc_create_dir() at test-bdc_create_dir.R:2:1 2. └─fs::dir_create(here::here("Output/Check")) ── Error ('test-bdc_create_figures.R:21:1'): (code run outside of `test_that()`) ── Error: Package `rworldmap` needed for this function to work! Please, install it with: `install.packages("rworldmap")` Backtrace: ▆ 1. └─bdc::bdc_create_figures(...) at test-bdc_create_figures.R:21:1 2. ├─base::suppressWarnings(...) 3. │ └─base::withCallingHandlers(...) 4. └─bdc:::check_require_cran("rworldmap") ── Error ('test-bdc_get_world_map.R:3:1'): (code run outside of `test_that()`) ── Error in `value[[3L]](cond)`: Failed to install the rnaturalearthhires package. Please try installing the package for yourself using the following command: devtools::install_github("ropensci/rnaturalearthhires") Backtrace: ▆ 1. ├─bdc:::bdc_get_world_map() at test-bdc_get_world_map.R:3:1 2. │ ├─base::suppressWarnings(...) 3. │ │ └─base::withCallingHandlers(...) 4. │ ├─... %>% sf::as_Spatial() 5. │ └─rnaturalearth::ne_countries(scale = "large", returnclass = "sf") 6. │ └─rnaturalearth:::get_data(scale = scale, type = type) 7. │ └─rnaturalearth::check_rnaturalearthhires() 8. │ └─rnaturalearth::install_rnaturalearthhires() 9. │ └─base::tryCatch(...) 10. │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 11. │ ├─base (local) tryCatchOne(...) 12. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 13. │ └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) 14. │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 15. │ └─value[[3L]](cond) 16. ├─sf::as_Spatial(.) 17. ├─dplyr::select(., name_long, iso2c, geometry) 18. ├─dplyr::mutate(...) 19. ├─dplyr::left_join(., cntr_names, by = c(name_long = "english_name")) 20. ├─bdc:::bdc_reword_countries(.) 21. │ └─data %>% ... 22. └─dplyr::mutate(., name_long = dplyr::recode(name_long, !!!vec_reword)) ── Error ('test-bdc_standardize_country.R:6:1'): (code run outside of `test_that()`) ── Error in `value[[3L]](cond)`: Failed to install the rnaturalearthhires package. Please try installing the package for yourself using the following command: devtools::install_github("ropensci/rnaturalearthhires") Backtrace: ▆ 1. ├─bdc:::bdc_get_world_map() at test-bdc_standardize_country.R:6:1 2. │ ├─base::suppressWarnings(...) 3. │ │ └─base::withCallingHandlers(...) 4. │ ├─... %>% sf::as_Spatial() 5. │ └─rnaturalearth::ne_countries(scale = "large", returnclass = "sf") 6. │ └─rnaturalearth:::get_data(scale = scale, type = type) 7. │ └─rnaturalearth::check_rnaturalearthhires() 8. │ └─rnaturalearth::install_rnaturalearthhires() 9. │ └─base::tryCatch(...) 10. │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 11. │ ├─base (local) tryCatchOne(...) 12. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 13. │ └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) 14. │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 15. │ └─value[[3L]](cond) 16. ├─sf::as_Spatial(.) 17. ├─dplyr::select(., name_long, iso2c, geometry) 18. ├─dplyr::mutate(...) 19. ├─dplyr::left_join(., cntr_names, by = c(name_long = "english_name")) 20. ├─bdc:::bdc_reword_countries(.) 21. │ └─data %>% ... 22. └─dplyr::mutate(., name_long = dplyr::recode(name_long, !!!vec_reword)) [ FAIL 12 | WARN 0 | SKIP 5 | PASS 63 ] Error: Test failures Execution halted