* using log directory 'd:/Rcompile/CRANpkg/local/4.1/globaltrends.Rcheck' * using R version 4.1.3 (2022-03-10) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'globaltrends/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'globaltrends' version '0.0.12' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'globaltrends' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [13s] OK * checking Rd files ... [1s] OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [6s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [8s] ERROR Running 'test_functions.r' [0s] Running 'testthat.r' [7s] Running the tests in 'tests/testthat.r' failed. Complete output: > library(testthat) > library(globaltrends) > > test_check("globaltrends") [ FAIL 16 | WARN 0 | SKIP 0 | PASS 2 ] == Failed tests ================================================================ -- Error (test-24months.R:6:1): (code run outside of `test_that()`) ------------ Error in `WDI::WDI(country = countries$location, indicator = "NY.GDP.MKTP.KD", start = 2018, end = 2018)`: The following indicators could not be downloaded: NY.GDP.MKTP.KD. Please make sure that you are running the latest version of the `WDI` package, and that the arguments you are using in the `WDI()` function are valid. Sometimes, downloads will suddenly stop working, even if nothing has changed in the R code of the WDI package. ("The same WDI package version worked yesterday!") In those cases, the problem is almost certainly related to the World Bank servers or to your internet connection. You can check if the World Bank web API is currently serving the indicator(s) of interest by typing a URL of this form in your web browser: https://api.worldbank.org/v2/en/country/all/indicator/NY.GDP.MKTP.KD?format=json&date=1960:2020&per_page=32500&page=1 Backtrace: x 1. \-globaltrends::initialize_db() at test-24months.R:6:0 2. \-globaltrends:::.enter_location(globaltrends_db = globaltrends_db) 3. \-WDI::WDI(...) -- Error (test-abnorm.R:8:1): (code run outside of `test_that()`) -------------- Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists. Backtrace: x 1. \-globaltrends::initialize_db() at test-abnorm.R:8:0 -- Error (test-computations.R:8:1): (code run outside of `test_that()`) -------- Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists. Backtrace: x 1. \-globaltrends::initialize_db() at test-computations.R:8:0 -- Error (test-db_functions.R:3:3): initialize --------------------------------- Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists. Backtrace: x 1. +-testthat::capture_messages(initialize_db()) at test-db_functions.R:3:2 2. | \-base::withCallingHandlers(...) 3. \-globaltrends::initialize_db() -- Error (test-db_functions.R:74:3): start1 ------------------------------------ Error: no such table: data_doi Backtrace: x 1. +-testthat::capture_messages(start_db()) at test-db_functions.R:74:2 2. | \-base::withCallingHandlers(...) 3. \-globaltrends::start_db() 4. +-dplyr::tbl(globaltrends_db, "data_doi") 5. \-dplyr:::tbl.DBIConnection(globaltrends_db, "data_doi") 6. +-dplyr::tbl(...) 7. \-dbplyr:::tbl.src_dbi(...) 8. \-dbplyr::tbl_sql(c(subclass, "dbi"), src = src, from = from, ...) 9. +-vars %||% dbplyr_query_fields(src$con, from) 10. \-dbplyr:::dbplyr_query_fields(src$con, from) 11. \-dbplyr:::dbplyr_fallback(con, "db_query_fields", ...) 12. +-rlang::eval_bare(expr((!!fun)(con, ...))) 13. \-dbplyr:::db_query_fields.DBIConnection(con, ...) 14. +-DBI::dbGetQuery(con, sql) 15. \-DBI::dbGetQuery(con, sql) 16. \-DBI (local) .local(conn, statement, ...) 17. +-DBI::dbSendQuery(conn, statement, ...) 18. \-RSQLite::dbSendQuery(conn, statement, ...) 19. \-RSQLite (local) .local(conn, statement, ...) 20. +-methods::new(...) 21. | +-methods::initialize(value, ...) 22. | \-methods::initialize(value, ...) 23. \-RSQLite:::result_create(conn@ptr, statement) -- Error (test-db_functions.R:109:3): disconnect ------------------------------- Error: no such table: data_doi Backtrace: x 1. \-globaltrends::start_db() at test-db_functions.R:109:2 2. +-dplyr::tbl(globaltrends_db, "data_doi") 3. \-dplyr:::tbl.DBIConnection(globaltrends_db, "data_doi") 4. +-dplyr::tbl(...) 5. \-dbplyr:::tbl.src_dbi(...) 6. \-dbplyr::tbl_sql(c(subclass, "dbi"), src = src, from = from, ...) 7. +-vars %||% dbplyr_query_fields(src$con, from) 8. \-dbplyr:::dbplyr_query_fields(src$con, from) 9. \-dbplyr:::dbplyr_fallback(con, "db_query_fields", ...) 10. +-rlang::eval_bare(expr((!!fun)(con, ...))) 11. \-dbplyr:::db_query_fields.DBIConnection(con, ...) 12. +-DBI::dbGetQuery(con, sql) 13. \-DBI::dbGetQuery(con, sql) 14. \-DBI (local) .local(conn, statement, ...) 15. +-DBI::dbSendQuery(conn, statement, ...) 16. \-RSQLite::dbSendQuery(conn, statement, ...) 17. \-RSQLite (local) .local(conn, statement, ...) 18. +-methods::new(...) 19. | +-methods::initialize(value, ...) 20. | \-methods::initialize(value, ...) 21. \-RSQLite:::result_create(conn@ptr, statement) -- Error (test-downloads.R:8:1): (code run outside of `test_that()`) ----------- Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists. Backtrace: x 1. \-globaltrends::initialize_db() at test-downloads.R:8:0 -- Error (test-export.R:8:1): (code run outside of `test_that()`) -------------- Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists. Backtrace: x 1. \-globaltrends::initialize_db() at test-export.R:8:0 -- Error (test-keywords.R:7:1): (code run outside of `test_that()`) ------------ Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists. Backtrace: x 1. \-globaltrends::initialize_db() at test-keywords.R:7:0 -- Error (test-locations.R:8:1): (code run outside of `test_that()`) ----------- Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists. Backtrace: x 1. \-globaltrends::initialize_db() at test-locations.R:8:0 -- Error (test-plot_bar.R:9:1): (code run outside of `test_that()`) ------------ Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists. Backtrace: x 1. \-globaltrends::initialize_db() at test-plot_bar.R:9:0 -- Error (test-plot_box.R:9:1): (code run outside of `test_that()`) ------------ Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists. Backtrace: x 1. \-globaltrends::initialize_db() at test-plot_box.R:9:0 -- Error (test-plot_map.R:9:1): (code run outside of `test_that()`) ------------ Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists. Backtrace: x 1. \-globaltrends::initialize_db() at test-plot_map.R:9:0 -- Error (test-plot_ts.R:9:1): (code run outside of `test_that()`) ------------- Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists. Backtrace: x 1. \-globaltrends::initialize_db() at test-plot_ts.R:9:0 -- Error (test-plot_voi_doi.R:8:1): (code run outside of `test_that()`) -------- Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists. Backtrace: x 1. \-globaltrends::initialize_db() at test-plot_voi_doi.R:8:0 -- Error (test-synonyms.R:8:1): (code run outside of `test_that()`) ------------ Error in `initialize_db()`: Error: File 'db/globaltrends_db.sqlite' already exists. Backtrace: x 1. \-globaltrends::initialize_db() at test-synonyms.R:8:0 [ FAIL 16 | WARN 0 | SKIP 0 | PASS 2 ] Error: Test failures In addition: Warning message: call dbDisconnect() when finished working with a connection Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking re-building of vignette outputs ... [3s] OK * checking PDF version of manual ... OK * DONE Status: 1 ERROR