* using log directory 'd:/Rcompile/CRANpkg/local/4.7/countries.Rcheck' * using R Under development (unstable) (2026-06-11 r90134 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 14.3.0 GNU Fortran (GCC) 14.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * current time: 2026-06-12 11:36:51 UTC * checking for file 'countries/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'countries' version '1.2.2' * 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 'countries' 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 code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [2s] OK * checking whether the package can be loaded with stated dependencies ... [1s] OK * checking whether the package can be unloaded cleanly ... [1s] OK * checking whether the namespace can be loaded with stated dependencies ... [1s] OK * checking whether the namespace can be unloaded cleanly ... [2s] OK * checking loading without being on the library search path ... [2s] 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 ... [8s] 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 ... [1s] OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking R/sysdata.rda ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [4s] ERROR Running examples in 'countries-Ex.R' failed The error most likely occurred in: > ### Name: country_info > ### Title: Get information about countries > ### Aliases: country_info > > ### ** Examples > > # Run examples only if a connection to the API is available: > if (check_countries_api(warnings = FALSE)){ + + # The example below queries information on the currency used in Brazil, US and France: + info <- country_info(countries = "Brazil", fields = "capital") + + # data for multiple countries can be requested + info <- country_info(countries = c("Brazil", "USA", "FR"), fields = "capital") + + #' # Data can be returned for all countries by leaving - countries - empty + info <- country_info(fields = "capital") + + # All available fields can be requested by leaving fields empty + info <- country_info(countries = c("Brazil", "USA", "FR")) + + # All information for all countries can be downloaded by leaving both arguments empty + info <- country_info() + + } Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, : arguments imply differing number of rows: 1, 0 Calls: country_info ... as.data.frame -> as.data.frame.list -> do.call -> Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [14s] ERROR Running 'testthat.R' [14s] Running the tests in 'tests/testthat.R' failed. Complete output: > library(testthat) > library(countries) > > test_check("countries") In total 1 unique country names were provided 1/1 have been matched with EXACT matching 0/1 have been matched with FUZZY matching The following country IDs do not have a match in one or more of the requested naming conventions, NA returned: (To avoid NAs, use - to = 'simple'- or set - na_fill = TRUE) - Taiwan All values in argument - x - are NA or NULL There is low confidence on the matching of some country names, keeping the original names in - x. Set - verbose - to TRUE for more details There is low confidence on the matching of some country names, returning the closest match. Set - verbose - to TRUE for more details Identifying columns to merge No merging keys were found. Will try merging all columns with matching names! The following columns are being merged: ======= ==== \ freq ======= ==== Table 1 freq Table 2 freq ======= ==== Performing merge: 1/1 Merge complete Identifying columns to merge No merging keys were found. Will try merging all columns with matching names! The following columns are being merged: ======= ==== \ freq ======= ==== Table 1 freq Table 2 freq ======= ==== Performing merge: 1/1 Merge complete (Set merging_info to TRUE to save merging details) Identifying columns to merge No merging keys were found. Will try merging all columns with matching names! The following columns are being merged: ======= ==== \ freq ======= ==== Table 1 freq Table 2 freq ======= ==== Performing merge: 1/1 Merge complete (Set merging_info to TRUE to save merging details) Identifying columns to merge No merging keys were found. Will try merging all columns with matching names! The following columns are being merged: ======= ==== \ freq ======= ==== Table 1 freq Table 2 freq ======= ==== Performing merge: 1/1 Merge complete (Set merging_info to TRUE to save merging details) Identifying columns to merge No merging keys were found. Will try merging all columns with matching names! The following columns are being merged: ======= ==== \ freq ======= ==== Table 1 freq Table 2 freq ======= ==== Performing merge: 1/1 Merge complete (Set merging_info to TRUE to save merging details) Identifying columns to merge No merging keys were found. Will try merging all columns with matching names! The following columns are being merged: ======= ==== \ freq ======= ==== Table 1 freq Table 2 freq ======= ==== Performing merge: 1/1 Merge complete (Set merging_info to TRUE to save merging details) Identifying columns to merge Table 2 - countries detected in column names, pivoting columns: France, Italy, US Converting country names No merging key found for Table 1. Data will be appended. The following columns are being merged: ======= ======================= \ country ======= ======================= Table 1 Table 2 Table2_pivoted_colnames ======= ======================= Performing merge: 1/1 Merge complete (Set merging_info to TRUE to save merging details) Identifying columns to merge Table 2 - countries detected in column names, pivoting columns: France, Italy, US Converting country names No merging key found for Table 1. Data will be appended. The following columns are being merged: ======= ======================= \ country ======= ======================= Table 1 Table 2 Table2_pivoted_colnames ======= ======================= Performing merge: 1/1 Merge complete (Set merging_info to TRUE to save merging details) Identifying columns to merge Table 2 - countries detected in column names, pivoting columns: France, Italy, US Converting country names No merging key found for Table 1. Data will be appended. The following columns are being merged: ======= ======================= \ country ======= ======================= Table 1 Table 2 Table2_pivoted_colnames ======= ======================= Performing merge: 1/1 Merge complete Identifying columns to merge Table 2 - countries detected in column names, pivoting columns: France, Italy, US Converting country names No merging key found for Table 1. Data will be appended. The following columns are being merged: ======= ======================= \ country ======= ======================= Table 1 Table 2 Table2_pivoted_colnames ======= ======================= Performing merge: 1/1 Merge complete Identifying columns to merge Table 2 - countries detected in column names, pivoting columns: France, Italy, US Converting country names No merging key found for Table 1. Data will be appended. The following columns are being merged: ======= ======================= \ country ======= ======================= Table 1 Table 2 Table2_pivoted_colnames ======= ======================= Performing merge: 1/1 Merge complete Identifying columns to merge Table 2 - countries detected in column names, pivoting columns: France, Italy, US Converting country names No merging key found for Table 1. Data will be appended. The following columns are being merged: ======= ======================= \ country ======= ======================= Table 1 Table 2 Table2_pivoted_colnames ======= ======================= Performing merge: 1/1 Merge complete (Set merging_info to TRUE to save merging details) Identifying columns to merge Table 2 - countries detected in column names, pivoting columns: France, Italy, US Converting country names No merging key found for Table 1. Data will be appended. The following columns are being merged: ======= ======================= \ country ======= ======================= Table 1 Table 2 Table2_pivoted_colnames ======= ======================= Performing merge: 1/1 Merge complete (Set merging_info to TRUE to save merging details) Identifying columns to merge No merging keys were found. Will try merging all columns with matching names! Data type for variable HS differ across tables - converting to character Data type for variable freq differ across tables - converting to character The following columns are being merged: ======= === ==== \ HS freq ======= === ==== Table 1 HS freq Table 2 HS Table 3 HS freq ======= === ==== Performing merge: 1/2 Performing merge: 2/2 Merge complete Identifying columns to merge No merging keys were found. Will try merging all columns with matching names! Data type for variable HS differ across tables - converting to character Data type for variable freq differ across tables - converting to character The following columns are being merged: ======= === ==== \ HS freq ======= === ==== Table 1 HS freq Table 2 HS Table 3 HS freq ======= === ==== Performing merge: 1/2 Performing merge: 2/2 Merge complete Identifying columns to merge No merging keys were found. Will try merging all columns with matching names! Data type for variable HS differ across tables - converting to character The following columns are being merged: ======= === \ HS ======= === Table 1 HS Table 2 HS ======= === Performing merge: 1/1 Merge complete (Set merging_info to TRUE to save merging details) Identifying columns to merge No merging keys were found. Will try merging all columns with matching names! Data type for variable HS differ across tables - converting to character The following columns are being merged: ======= === \ HS ======= === Table 1 HS Table 2 HS ======= === Performing merge: 1/1 Merge complete (Set merging_info to TRUE to save merging details) Identifying columns to merge Table 1 - countries detected in column names, pivoting columns: France, Italy, US Table 2 - years detected in column names, pivoting columns: France1992, France1993, France1994 Converting country names Checking time columns The following columns are being merged: ======= ======================= ===================== \ country time ======= ======================= ===================== Table 1 Table1_pivoted_colnames Table 2 year_pivoted_colnames ======= ======================= ===================== Performing merge: 1/1 Merge complete Identifying columns to merge Table 2 - countries detected in column names, pivoting columns: France, Italy, US Converting country names No merging key found for Table 1. Data will be appended. The following columns are being merged: ======= ======================= \ country ======= ======================= Table 1 Table 2 Table2_pivoted_colnames ======= ======================= Performing merge: 1/1 Merge complete (Set merging_info to TRUE to save merging details) Identifying columns to merge Table 1 - countries detected in column names, pivoting columns: Japan, Norway, Germany, US Table 2 - countries detected in column names, pivoting columns: France, Italy, US Converting country names Checking time columns The following columns are being merged: ======= ======================= ==== \ country time ======= ======================= ==== Table 1 Table1_pivoted_colnames Date Table 2 Table2_pivoted_colnames ======= ======================= ==== Performing merge: 1/1 Merge complete (Set merging_info to TRUE to save merging details) Identifying columns to merge Checking time columns No merging key found for Table 2. Data will be appended. The following columns are being merged: ======= ==== \ time ======= ==== Table 1 Date Table 2 ======= ==== Performing merge: 1/1 Merge complete (Set merging_info to TRUE to save merging details) Identifying columns to merge Checking time columns No merging key found for Table 2. Data will be appended. The following columns are being merged: ======= ==== \ time ======= ==== Table 1 Date Table 2 ======= ==== Performing merge: 1/1 Merge complete countries detected in column names, pivoting columns: France, Italy, US countries detected in column names, pivoting columns: France, Italy, US countries detected in column names, pivoting columns: France, Italy, US countries detected in column names, pivoting columns: France, Italy, US countries detected in column names, pivoting columns: France, Italy, US countries detected in column names, pivoting columns: France, Italy, US countries detected in column names, pivoting columns: France, Italy, US countries detected in column names, pivoting columns: France, Italy, US No column was pivoted No column was pivoted No column was pivoted year detected in column names, pivoting columns: France1992, France1993, France1994 year detected in column names, pivoting columns: France1992, France1993, France1994 year detected in column names, pivoting columns: France1992, France1993, France1994 year detected in column names, pivoting columns: France1992, France1993, France1994 Saving _problems/test_function_output-251.R Saving _problems/test_function_output-260.R [ FAIL 2 | WARN 0 | SKIP 0 | PASS 146 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test_function_output.R:251:5'): output from list_fields() are as expected ── Error in `(function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, fix.empty.names = TRUE, stringsAsFactors = FALSE) { data.row.names <- if (check.rows && is.null(row.names)) function(current, new, i) { if (is.character(current)) new <- as.character(new) if (is.character(new)) current <- as.character(current) if (anyDuplicated(new)) return(current) if (is.null(current)) return(new) if (all(current == new) || all(current == "")) return(new) stop(gettextf("mismatch of row names in arguments of 'data.frame', item %d", i), domain = NA) } else function(current, new, i) { current %||% if (anyDuplicated(new)) { warning(gettextf("some row.names duplicated: %s --> row.names NOT used", paste(which(duplicated(new)), collapse = ",")), domain = NA) current } else new } object <- as.list(substitute(list(...)))[-1L] mirn <- missing(row.names) mrn <- is.null(row.names) fixRN <- function(rownms) { if (is.object(rownms) || !is.integer(rownms)) rownms <- as.character(rownms) if (anyNA(rownms)) stop("row names contain missing values") if (anyDuplicated(rownms)) stop(gettextf("duplicate row.names: %s", paste(unique(rownms[duplicated(rownms)]), collapse = ", ")), domain = NA) rownms } x <- list(...) n <- length(x) if (n < 1L) { row.names <- if (!mrn) fixRN(row.names) else integer() return(structure(list(), names = character(), row.names = row.names, class = "data.frame")) } vnames <- names(x) if (length(vnames) != n) vnames <- character(n) no.vn <- !nzchar(vnames) vlist <- vnames <- as.list(vnames) nrows <- ncols <- integer(n) for (i in seq_len(n)) { xi <- if (is.character(x[[i]]) || is.list(x[[i]])) as.data.frame(x[[i]], optional = TRUE, validRN = FALSE, stringsAsFactors = stringsAsFactors) else as.data.frame(x[[i]], optional = TRUE, validRN = FALSE) nrows[i] <- .row_names_info(xi) ncols[i] <- length(xi) namesi <- names(xi) if (ncols[i] > 1L) { if (length(namesi) == 0L) namesi <- seq_len(ncols[i]) vnames[[i]] <- if (no.vn[i]) namesi else paste(vnames[[i]], namesi, sep = ".") } else if (length(namesi)) { vnames[[i]] <- namesi } else if (fix.empty.names && no.vn[[i]]) { tmpname <- deparse(object[[i]], nlines = 1L)[1L] if (startsWith(tmpname, "I(") && endsWith(tmpname, ")")) { ntmpn <- nchar(tmpname, "c") tmpname <- substr(tmpname, 3L, ntmpn - 1L) } vnames[[i]] <- tmpname } if (mirn && nrows[i] > 0L) { rowsi <- attr(xi, "row.names") if (any(nzchar(rowsi))) row.names <- data.row.names(row.names, rowsi, i) } nrows[i] <- abs(nrows[i]) vlist[[i]] <- xi } nr <- max(nrows) for (i in seq_len(n)[nrows < nr]) { xi <- vlist[[i]] if (nrows[i] > 0L && (nr%%nrows[i] == 0L)) { xi <- unclass(xi) fixed <- TRUE for (j in seq_along(xi)) { xi1 <- xi[[j]] if (is.vector(xi1) || is.factor(xi1)) xi[[j]] <- rep(xi1, length.out = nr) else if (is.character(xi1) && inherits(xi1, "AsIs")) xi[[j]] <- structure(rep(xi1, length.out = nr), class = class(xi1)) else if (inherits(xi1, "Date") || inherits(xi1, "POSIXct")) xi[[j]] <- rep(xi1, length.out = nr) else { fixed <- FALSE break } } if (fixed) { vlist[[i]] <- xi next } } stop(gettextf("arguments imply differing number of rows: %s", paste(unique(nrows), collapse = ", ")), domain = NA) } value <- unlist(vlist, recursive = FALSE, use.names = FALSE) vnames <- as.character(unlist(vnames[ncols > 0L])) if (fix.empty.names && any(noname <- !nzchar(vnames))) vnames[noname] <- paste0("Var.", seq_along(vnames))[noname] if (check.names) { if (fix.empty.names) vnames <- make.names(vnames, unique = TRUE) else { nz <- nzchar(vnames) vnames[nz] <- make.names(vnames[nz], unique = TRUE) } } names(value) <- vnames if (!mrn) { if (length(row.names) == 1L && nr != 1L) { if (is.character(row.names)) row.names <- match(row.names, vnames, 0L) if (length(row.names) != 1L || row.names < 1L || row.names > length(vnames)) stop("'row.names' should specify one of the variables") i <- row.names row.names <- value[[i]] value <- value[-i] } else if (!is.null(row.names) && length(row.names) != nr) stop("row names supplied are of the wrong length") } else if (!is.null(row.names) && length(row.names) != nr) { warning("row names were found from a short variable and have been discarded") row.names <- NULL } class(value) <- "data.frame" if (is.null(row.names)) attr(value, "row.names") <- .set_row_names(nr) else { row.names(value) <- fixRN(row.names) } value })(success = FALSE, data = NULL, errors = structure(list(message = "This API version has been deprecated. Please visit the https://restcountries.com/docs/legacy-api-deprecation to migrate to our new version (v5)."), class = "data.frame", row.names = 1L), check.names = TRUE, fix.empty.names = TRUE, stringsAsFactors = FALSE)`: arguments imply differing number of rows: 1, 0 Backtrace: ▆ 1. ├─testthat::expect_equal(length(list_fields()) > 0, TRUE) at test_function_output.R:251:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─countries::list_fields() 5. └─countries::country_info() 6. ├─base::as.data.frame(data) 7. └─base::as.data.frame.list(data) 8. ├─base::do.call(data.frame, c(x, alis)) 9. └─base (local) ``(...) ── Error ('test_function_output.R:260:5'): output from country_info() are as expected ── Error in `(function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, fix.empty.names = TRUE, stringsAsFactors = FALSE) { data.row.names <- if (check.rows && is.null(row.names)) function(current, new, i) { if (is.character(current)) new <- as.character(new) if (is.character(new)) current <- as.character(current) if (anyDuplicated(new)) return(current) if (is.null(current)) return(new) if (all(current == new) || all(current == "")) return(new) stop(gettextf("mismatch of row names in arguments of 'data.frame', item %d", i), domain = NA) } else function(current, new, i) { current %||% if (anyDuplicated(new)) { warning(gettextf("some row.names duplicated: %s --> row.names NOT used", paste(which(duplicated(new)), collapse = ",")), domain = NA) current } else new } object <- as.list(substitute(list(...)))[-1L] mirn <- missing(row.names) mrn <- is.null(row.names) fixRN <- function(rownms) { if (is.object(rownms) || !is.integer(rownms)) rownms <- as.character(rownms) if (anyNA(rownms)) stop("row names contain missing values") if (anyDuplicated(rownms)) stop(gettextf("duplicate row.names: %s", paste(unique(rownms[duplicated(rownms)]), collapse = ", ")), domain = NA) rownms } x <- list(...) n <- length(x) if (n < 1L) { row.names <- if (!mrn) fixRN(row.names) else integer() return(structure(list(), names = character(), row.names = row.names, class = "data.frame")) } vnames <- names(x) if (length(vnames) != n) vnames <- character(n) no.vn <- !nzchar(vnames) vlist <- vnames <- as.list(vnames) nrows <- ncols <- integer(n) for (i in seq_len(n)) { xi <- if (is.character(x[[i]]) || is.list(x[[i]])) as.data.frame(x[[i]], optional = TRUE, validRN = FALSE, stringsAsFactors = stringsAsFactors) else as.data.frame(x[[i]], optional = TRUE, validRN = FALSE) nrows[i] <- .row_names_info(xi) ncols[i] <- length(xi) namesi <- names(xi) if (ncols[i] > 1L) { if (length(namesi) == 0L) namesi <- seq_len(ncols[i]) vnames[[i]] <- if (no.vn[i]) namesi else paste(vnames[[i]], namesi, sep = ".") } else if (length(namesi)) { vnames[[i]] <- namesi } else if (fix.empty.names && no.vn[[i]]) { tmpname <- deparse(object[[i]], nlines = 1L)[1L] if (startsWith(tmpname, "I(") && endsWith(tmpname, ")")) { ntmpn <- nchar(tmpname, "c") tmpname <- substr(tmpname, 3L, ntmpn - 1L) } vnames[[i]] <- tmpname } if (mirn && nrows[i] > 0L) { rowsi <- attr(xi, "row.names") if (any(nzchar(rowsi))) row.names <- data.row.names(row.names, rowsi, i) } nrows[i] <- abs(nrows[i]) vlist[[i]] <- xi } nr <- max(nrows) for (i in seq_len(n)[nrows < nr]) { xi <- vlist[[i]] if (nrows[i] > 0L && (nr%%nrows[i] == 0L)) { xi <- unclass(xi) fixed <- TRUE for (j in seq_along(xi)) { xi1 <- xi[[j]] if (is.vector(xi1) || is.factor(xi1)) xi[[j]] <- rep(xi1, length.out = nr) else if (is.character(xi1) && inherits(xi1, "AsIs")) xi[[j]] <- structure(rep(xi1, length.out = nr), class = class(xi1)) else if (inherits(xi1, "Date") || inherits(xi1, "POSIXct")) xi[[j]] <- rep(xi1, length.out = nr) else { fixed <- FALSE break } } if (fixed) { vlist[[i]] <- xi next } } stop(gettextf("arguments imply differing number of rows: %s", paste(unique(nrows), collapse = ", ")), domain = NA) } value <- unlist(vlist, recursive = FALSE, use.names = FALSE) vnames <- as.character(unlist(vnames[ncols > 0L])) if (fix.empty.names && any(noname <- !nzchar(vnames))) vnames[noname] <- paste0("Var.", seq_along(vnames))[noname] if (check.names) { if (fix.empty.names) vnames <- make.names(vnames, unique = TRUE) else { nz <- nzchar(vnames) vnames[nz] <- make.names(vnames[nz], unique = TRUE) } } names(value) <- vnames if (!mrn) { if (length(row.names) == 1L && nr != 1L) { if (is.character(row.names)) row.names <- match(row.names, vnames, 0L) if (length(row.names) != 1L || row.names < 1L || row.names > length(vnames)) stop("'row.names' should specify one of the variables") i <- row.names row.names <- value[[i]] value <- value[-i] } else if (!is.null(row.names) && length(row.names) != nr) stop("row names supplied are of the wrong length") } else if (!is.null(row.names) && length(row.names) != nr) { warning("row names were found from a short variable and have been discarded") row.names <- NULL } class(value) <- "data.frame" if (is.null(row.names)) attr(value, "row.names") <- .set_row_names(nr) else { row.names(value) <- fixRN(row.names) } value })(success = FALSE, data = NULL, errors = structure(list(message = "This API version has been deprecated. Please visit the https://restcountries.com/docs/legacy-api-deprecation to migrate to our new version (v5)."), class = "data.frame", row.names = 1L), check.names = TRUE, fix.empty.names = TRUE, stringsAsFactors = FALSE)`: arguments imply differing number of rows: 1, 0 Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test_function_output.R:260:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::is.data.frame(country_info("USA", "capital")) 5. └─countries::country_info("USA", "capital") 6. ├─base::as.data.frame(data) 7. └─base::as.data.frame.list(data) 8. ├─base::do.call(data.frame, c(x, alis)) 9. └─base (local) ``(...) [ FAIL 2 | WARN 0 | SKIP 0 | PASS 146 ] Error: ! Test failures. Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [13s] OK * checking PDF version of manual ... [20s] OK * checking HTML version of manual ... [6s] OK * DONE Status: 2 ERRORs